mutt – send mails with attachments


By using mutt we can send mails with attachments from command line.

Install mutt:

$ apt-get install mutt

Send mail with attachment:

$ mutt -s "PFA" -a attachment.txt < body.txt


$ echo "body text here" | mutt -s "PFA" -a attachment.txt

Send mail without attachment:

$ mutt -s "PFA" < body.txt


$ echo "body text here"  | mutt -s "PFA"

Roundcube SMTP Error (250): Authentication failed

Recently while trying to install roundcube I am stuck with the error “roundcube SMTP Error (250): Authentication failed”.

With the error the clear hint is there should be some issue with SMTP setting, so I checked all SMTP settings and I had bit doubt on following settings.

$rcmail_config['smtp_user'] = '%u';

$rcmail_config['smtp_pass'] = '%p';

After doing some experiments with my file following tweaks are worked for me.

$rcmail_config['smtp_user'] = '';

$rcmail_config['smtp_pass'] = '';


Remove password from openssl key file


To remove password from openssl key file use following command:

$ openssl rsa -in originalkeywithpass.key -out newkeywithnopass.key

Above command will asks for pass phrase key of originalkeywithpass.key, so enter pass phase key here.

Now replace originalkeywithpass.key with newkeywithnopass.key


Create mailing list Linux mail server


To create mailing list in Linux mail server you need mailing list name (Ex: mailingListName), list of users to include in the mailing list (Ex: user1, user2, user3, etc….).

Open /etc/aliases with any text editor and add following line below # General redirections for pseudo accounts.

mailingListName: user1,user2,user3

Now save and exit from /etc/aliases file.

Compile aliases with following command:

$ newaliases

/etc/aliases: 79 aliases, longest 259 bytes, 1205 bytes total

Now test by sending a test mail to


Squirrel mail Increase Attachment Size In Linux


Squirrel mail is one of the popular open source web mail client.

By default squirrel mail supports upto 2MB attachments.

In general we may attach more than 2MB size attachments.

To increase/decrease attachment size in squirrel mail you need to update it in php.ini as explained below:

  • Open /etc/php.ini with any editor
  • Search for upload_max_filesize in /etc/php.ini, by default it will be upload_max_filesize = 2M
  • Just change the value of 2M (which 2MB) as you required (Example: upload_max_filesize = 5M).
  • After updating in php.ini restart httpd service with service httpd restart
  • Now just upload any any attchment and test.