It’s all in a day’s work

If only a day had 48 hours…
  • rss
  • Home
  • About DelGurth

Debian Etch Postfix + Sasl2

DelGurth | Sunday, December 2, 2007

Some time ago I had some problems sending mail to one of our clients, something with their primary mailserver not accepting connections and a non-existent secondary mailserver. So I wanted to enable authenticated mail sending on my own mailserver.

It was quite easy to get it working, after finding some articles which I could use. The biggest problem was the jail Postfix was in so it couldn’t talk with saslauthd direcly.

I added the following in my main.cf

#SMTP Auth
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
smtpd_sasl_authenticated_header = yes
smtpd_sasl_path = smtpd
smtpd_sasl_local_domain =
broken_sasl_auth_clients = yes

smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination, reject_unknown_recipient_domain

And I created directory sasl and placed a smtpd.conf in there containing:

pwcheck_method: saslauthd
mech_list: plain login

And I changed /etc/default/saslauthd to use the suggested option (suggested in comment in the file itself):

OPTIONS="-c -m /var/spool/postfix/var/run/saslauthd"

Used articles:

  • The first article I found on the subject
  • A mailinglist post describing a problem I encountered (I didn’t use the suggested solution)
  • A good article on howtoforge describing the final solution I used

Update 2008-05-15:
Today I ran into a problem after I did a package upgrade. I got the warning:

SASL authentication failure: cannot connect to saslauthd server: Permission denied

Seems some permissions where incorrect. I did a:

sudo chgrp sasl /var/spool/postfix/var/run/saslauthd
sudo passwd postfix sasl
sudo /etc/init.d/postfix restart

and that solved it. Why I didn’t get this before I don’t know, but well, this fixed it. Thanks to Jimmy who blogged about Debian and SASL as well.

Comments
No Comments »
Categories
Debian, Debian/Ubuntu, Etch, Postfix
Comments rss Comments rss
Trackback Trackback


Categories

  • Debian (5)
  • Debian/Ubuntu (6)
  • Dell D830 (2)
  • Development (1)
  • E65 (1)
  • Eclipse (4)
  • Etch (2)
  • Feisty (2)
  • General (4)
  • Hardy (3)
  • Internet Explorer (1)
  • Java (1)
  • JSP (1)
  • JSTL (1)
  • Misc (3)
  • Nokia (1)
  • one-liners (1)
  • Optimizing performance (1)
  • Packages (2)
  • Phones (1)
  • PHP (2)
  • Postfix (1)
  • SQL Injection (1)
  • SVN (3)
  • Testing (3)
  • Ubuntu (7)
  • Ubuntu x86_64 (2)
  • VOIP (1)
  • Wordpress (7)

Friend blogs

  • AgileMore
  • Borselaer.org
  • Schapendonk.org
  • Twistedmind’s site

Sites I like

  • Joel on Software
  • The Tom Kyte Blog
  • Windows Keyboard Shortcut of the Day

Archives

  • January 2009 (1)
  • December 2008 (1)
  • November 2008 (1)
  • October 2008 (4)
  • September 2008 (1)
  • August 2008 (6)
  • May 2008 (4)
  • April 2008 (1)
  • March 2008 (1)
  • February 2008 (2)
  • December 2007 (1)
  • November 2007 (3)
  • October 2007 (2)
  • September 2007 (3)
  • August 2007 (1)
rss Comments rss valid xhtml 1.1 design by jide powered by Wordpress get firefox