Category Archives: Ubuntu

SMTP authorization does not work on Plesk 11

flattr this!

I was having this issue today and wasted quite a lot of time trying to figure out what was going wrong. The client’s server was running Plesk 11 and had SMTP running with port 25 open. IMAP was working flawlessly but Outlook kept returning the login box with “Login Failed” error pointing towards wrong credentials. But I knew the password was correct so I started haunting.

I logged in as root user and checked the mail log file at:
/usr/local/psa/var/log/maillog

And there I found a lot of warnings but one stood out:

postfix/smtpd[31280]: warning: SASL authentication failure: realm changed: authentication aborted
postfix/smtpd[31280]: warning: SASL DIGEST-MD5 authentication failed: authentication failure
postfix/smtpd[31280]: warning: SASL authentication failure: cannot connect to saslauthd server: No such file or directory
postfix/smtpd[31280]: warning: SASL LOGIN authentication failed: generic failure

“No such file or directory”? Interesting.

I did a quick edit of the smtpd.conf by running:
nano /usr/lib64/sasl2/smtpd.conf

And there I saw the problem. The saslauthd_path and sql_database were wrong paths:

pwcheck_method: auxprop saslauthd
auxprop_plugin: sql_sqlite3
saslauthd_path: /postfix/private/plesk_saslauthd
mech_list: DIGEST-MD5 CRAM-MD5 PLAIN LOGIN
auto_transition: yes
sql_engine: sqlite3
sql_hostnames: localhost
sql_database: /postfix/plesk/passwd.db
sql_select: SELECT `%p` FROM domains d, users u WHERE u.name='%u' and d.name='%r' and d.status=0 and u.status=0 and u.dom_id=d.id
sql_verbose: yes
log_level: 9

I just added the “/var/spool/postfix” before the paths and the correct file looks like:

pwcheck_method: auxprop saslauthd
auxprop_plugin: sql_sqlite3
saslauthd_path: /var/spool/postfix/private/plesk_saslauthd
mech_list: DIGEST-MD5 CRAM-MD5 PLAIN LOGIN
auto_transition: yes
sql_engine: sqlite3
sql_hostnames: localhost
sql_database: /var/spool/postfix/plesk/passwd.db
sql_select: SELECT `%p` FROM domains d, users u WHERE u.name='%u' and d.name='%r' and d.status=0 and u.status=0 and u.dom_id=d.id
sql_verbose: yes
log_level: 9

Saved and got out, restarted the postfix:
/etc/init.d/postix restart

And hit the Send/Receive button and guess what… it worked! Please share this post and leave a comment if this worked for you.

Postfix not sending mails after installing and uninstalling Sendmail

flattr this!

I got bitten today, really bad! My story starts when postfix stopped working for me (after the update last night). All I had to do was re-install postfix but in desperation I ended up installing Sendmail and that’s how it all started! I found my mistake, uninstalling Sendmail and then reinstalled Postfix. But it was too late. Now the server wasn’t sending emails. I quickly jumped to /var/log/mail.log which read:

postfix/master: fatal: bind 0.0.0.0 port 25: Address already in use

A big of Googling to see what was using port 25, I had to install sockstat as it gives you the process ID of the process running on that port:

socket | grep :25

The output I got was very interesting:

root     sendmail-mta    17059    tcp4    127.0.0.1:25     *:*    LISTEN

Aha! I thought I had uninstalled Sendmail! Well I have, but the process is still running(!) and holding the port 25 at bay!

A quick kill command:

kill 17059

(replace the number with the process id you got in the previous command)

Give Postfix a reboot and viola! It works!

If this works for you, please leave a comment :)

Sharing Folders in Ubuntu 9.10 using VirtualBox

flattr this!

I just wanted to share a folder in Ubuntu 9.10 which I have installed using VirtualBox. Whenever I tried mounting the shared folder using the mount command, I kept getting the following error:

/sbin/mount.vboxsf: mounting failed with the error: No such file or directory

After wandering through forum after forum and post after post, I finally got to share my folder in Ubuntu 9.10 using VirtualBox. The whole process was a mesh so I thought I should create a simple post, so here goes:

Adding Share Folder to VirtualBox

  1. Start by opening VirtualBox (making sure Ubuntu is Powered Off), right-click the Ubuntu Virtual Machine in the left column and choose Settings
  2. Click Shared Folders option in the left column
  3. Click the Add new shared folder button (its a folder with a + sign) located on the right
  4. A small window pops up asking you the Folder Path (a drop-down) and a Folder Name (no spaces)
  5. Once you are happy with everything, press OK twice to close this pop up and the Settings window. Now start the Ubuntu 9.10 Virtual Machine

Mounting Shared Folder in Ubuntu 9.10

  1. Start the Terminal by going to Applications > Accessories > Terminal
  2. Create a folder under mnt directory by:

    sudo mkdir /mnt/my_shared_folder

    replace my_shared_folder with whatever you want to call the shared folder

  3. Now mount the shared folder by:

    sudo mount -t vboxsf my_folder /mnt/my_shared_folder

    replace my_folder with what you entered in the Folder Name when you added the folder under Settings and replace my_shared_folder with whatever you have called the folder in the previous step

  4. You’re done!

Please do leave a comment if this works for you :)