Set up your mail server for sending

From LinuxIntro
Revision as of 22:34, 1 October 2008 by WikiSysop (Talk)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Sender verification

Now you do not want anyone to be able to use your mail server as spam-catapult. So you need sender verification in your postfix service.

Make sure your authentication service is running:

/etc/init.d/saslauthd status 

has to deliver

running

In /etc/postfix/main.cf, set

smtp_sasl_auth_enable = yes
smtpd_sasl_auth_enable = yes

Restart Postfix

/etc/init.d/postfix restart

Start kmail, setup localhost as incoming and outgoing mail server. In kmail, change the sending account's authentication method to "LOGIN". Send a mail to testuser@localhost.

TroubleShooting

If you get

Sending failed: Your SMTP server does not support authentication. The server responded: "5.5.1 Error: authentication not enabled"

You will need to modify /etc/postfix/main.cf, set

smtp_sasl_auth_enable = yes
smtpd_sasl_auth_enable = yes

and restart postfix:

/etc/init.d/postfix restart

If you get

Sending failed. Most likely the password is wrong. The server responded: "5.7.8 Error: authentication failed: generic failure"

You need to make sure your authentication service has been started:

/etc/init.d/saslauthd status

has to deliver

running

If you get

Sending failed: Your SMTP server does not support The server responded: "5.7.8 Error: authentication failed: no mechanism available"

You may have

  • plain
  • digest-md5
  • cram-md5

as authentication method in kmail. Change this to Login.

If you get

Sending failed: An error occurred during authentication: SASL(-4):no mechanism available: No worthy mechs found

You may have

  • GSSAPI

as authentication method in kmail. Change this to Login.

If nothing happens and no mail is sent, you may have

  • NTLM

as authentication method in kmail. Change this to Login.