Difference between revisions of "Set up your mail server for sending"

From Linuxintro
imported>ThorstenStaerk
imported>ThorstenStaerk
Line 15: Line 15:
 
== TroubleShooting ==
 
== TroubleShooting ==
  
If you get  
+
=== Authentication not enabled ===
 +
;Symptom:
 +
You get  
 
  Sending failed: Your SMTP server does not support authentication. The server responded: "5.5.1 Error: authentication not enabled"
 
  Sending failed: Your SMTP server does not support authentication. The server responded: "5.5.1 Error: authentication not enabled"
  
 +
;Solution:
 
You will need to modify /etc/postfix/main.cf, set  
 
You will need to modify /etc/postfix/main.cf, set  
 
  smtp_sasl_auth_enable = yes
 
  smtp_sasl_auth_enable = yes
Line 24: Line 27:
 
  /etc/init.d/postfix restart
 
  /etc/init.d/postfix restart
  
If you get
+
=== generic failure ===
 +
;Symptom:
 +
You get
 
  Sending failed. Most likely the password is wrong. The server responded: "5.7.8 Error: authentication failed: generic failure"
 
  Sending failed. Most likely the password is wrong. The server responded: "5.7.8 Error: authentication failed: generic failure"
 +
 +
;Solution:
 
You need to make sure your authentication service has been started:
 
You need to make sure your authentication service has been started:
 
  /etc/init.d/saslauthd status
 
  /etc/init.d/saslauthd status
Line 31: Line 38:
 
  running
 
  running
  
If you get  
+
=== no authentication mechanism available ===
 +
;Symptom:
 +
You get  
 
  Sending failed: Your SMTP server does not support The server responded: "5.7.8 Error: authentication failed: no mechanism available"
 
  Sending failed: Your SMTP server does not support The server responded: "5.7.8 Error: authentication failed: no mechanism available"
 +
 +
;Reson:
 
You may have
 
You may have
 
* plain
 
* plain
 
* digest-md5
 
* digest-md5
 
* cram-md5
 
* cram-md5
as authentication method in kmail. Change this to Login.
+
as authentication method in kmail.  
 +
 
 +
;Solution:
 +
Change this to Login.
  
If you get
+
=== no worthy mechanisms found ===
 +
;Symptom:
 +
You get
 
  Sending failed: An error occurred during authentication: SASL(-4):no mechanism available: No worthy mechs found
 
  Sending failed: An error occurred during authentication: SASL(-4):no mechanism available: No worthy mechs found
 +
 +
;Reason:
 
You may have
 
You may have
 
* GSSAPI
 
* GSSAPI
as authentication method in kmail. Change this to Login.
+
as authentication method in kmail.  
 +
 
 +
;Solution:
 +
Change this to Login.
 +
 
 +
=== no mail is sent ===
 +
;Symptom:
 +
Nothing happens and no mail is sent
  
If nothing happens and no mail is sent, you may have
+
;Reason:
 +
You may have
 
* NTLM  
 
* NTLM  
as authentication method in kmail. Change this to Login.
+
as authentication method in kmail.  
 +
 
 +
;Solution:
 +
Change this to Login.
  
 
smtpd_recipient_restrictions = permit_mynetworks,
 
smtpd_recipient_restrictions = permit_mynetworks,

Revision as of 12:01, 31 March 2012

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

Authentication not enabled

Symptom

You get

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

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

generic failure

Symptom

You get

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

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

/etc/init.d/saslauthd status

has to deliver

running

no authentication mechanism available

Symptom

You get

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

You may have

  • plain
  • digest-md5
  • cram-md5

as authentication method in kmail.

Solution

Change this to Login.

no worthy mechanisms found

Symptom

You get

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

You may have

  • GSSAPI

as authentication method in kmail.

Solution

Change this to Login.

no mail is sent

Symptom

Nothing happens and no mail is sent

Reason

You may have

  • NTLM

as authentication method in kmail.

Solution

Change this to Login.

smtpd_recipient_restrictions = permit_mynetworks,

                               permit_sasl_authenticated,
                               reject_unauth_destination,
                               check_policy_service inet:127.0.0.1:60000