New user's registration have been closed due to high spamming and low trafic on this forum. Please contact forum admins directly if you need an account. Thanks !
Authentication e-mail with Postfix
-
- Posts: 39
- Joined: 22 Apr 2007, 03:01
- Location: Great Britain
Authentication e-mail with Postfix
When I try and send emails from my bubba server, postfix fails to authenticate - see log below.
Sep 26 14:13:45 bubba postfix/cleanup[19412]: F1F742420221: message-id=<20080926131344.F1F742420221@bubba.localdomain>
Sep 26 14:13:45 bubba postfix/qmgr[19395]: F1F742420221: from=<root@localhost>, size=287, nrcpt=1 (queue active)
Sep 26 14:13:45 bubba postfix/smtp[19414]: warning: SASL authentication failure: No worthy mechs found
Sep 26 14:13:45 bubba postfix/smtp[19414]: F1F742420221: to=<peter.tuson@btinternet.com>, relay=mail.btinternet.com[217.146.188.192], delay=1, status=deferred (Authentication failed: cannot SASL authenticate to server mail.btinternet.com[217.146.188.192]: no mechanism available)
postfix is configured with:
relayhost = [mail.btinternet.com]
smtp_sasl_auth_enable=yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
My sasl_passwd has the entry like
[mail.btinternet.com] myusername@btinternet.com:mypassword
This was more or less as it was set up through bubba's web interface. Does anyone have any ideas on how to fix it?
Sep 26 14:13:45 bubba postfix/cleanup[19412]: F1F742420221: message-id=<20080926131344.F1F742420221@bubba.localdomain>
Sep 26 14:13:45 bubba postfix/qmgr[19395]: F1F742420221: from=<root@localhost>, size=287, nrcpt=1 (queue active)
Sep 26 14:13:45 bubba postfix/smtp[19414]: warning: SASL authentication failure: No worthy mechs found
Sep 26 14:13:45 bubba postfix/smtp[19414]: F1F742420221: to=<peter.tuson@btinternet.com>, relay=mail.btinternet.com[217.146.188.192], delay=1, status=deferred (Authentication failed: cannot SASL authenticate to server mail.btinternet.com[217.146.188.192]: no mechanism available)
postfix is configured with:
relayhost = [mail.btinternet.com]
smtp_sasl_auth_enable=yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
My sasl_passwd has the entry like
[mail.btinternet.com] myusername@btinternet.com:mypassword
This was more or less as it was set up through bubba's web interface. Does anyone have any ideas on how to fix it?
peter
-
- Posts: 39
- Joined: 22 Apr 2007, 03:01
- Location: Great Britain
-
- Posts: 39
- Joined: 22 Apr 2007, 03:01
- Location: Great Britain
Eek thanks for your prompt.
smtp_sasl_security_options was set to noplaintext and noanonymous. Now set to JUST noanonymous.
Log now says:
relay=mail.btinternet.com[217.146.188.192], delay=77814, status=bounced (host mail.btinternet.com[217.146.188.192] said: 553 From: address not verified; see http://help.yahoo.com/l/us/yahoo/mail/o ... om-07.html (in reply to MAIL FROM command))
Any ideas?
Fetchmail is working fine for me. I can send e-mails to my bubba server through my ISP without any problems.
smtp_sasl_security_options was set to noplaintext and noanonymous. Now set to JUST noanonymous.
Log now says:
relay=mail.btinternet.com[217.146.188.192], delay=77814, status=bounced (host mail.btinternet.com[217.146.188.192] said: 553 From: address not verified; see http://help.yahoo.com/l/us/yahoo/mail/o ... om-07.html (in reply to MAIL FROM command))
Any ideas?
Fetchmail is working fine for me. I can send e-mails to my bubba server through my ISP without any problems.
peter
-
- Posts: 39
- Joined: 22 Apr 2007, 03:01
- Location: Great Britain
Eek, thanks for your help.
I have now got this working by setting up an alternative identity for the person sending e-mails from the bubba server.
This identity is set to the identity that the ISP expects to see if I was using a client email tool such as evolution, i.e. username@btinternet.com.
I have now got this working by setting up an alternative identity for the person sending e-mails from the bubba server.
This identity is set to the identity that the ISP expects to see if I was using a client email tool such as evolution, i.e. username@btinternet.com.
peter
Remember that the option "noplaintext" is for security reasons, as usually, you don't want the world to be able to see your passwordsPeterTuson wrote:Eek, thanks for your help.
I have now got this working by setting up an alternative identity for the person sending e-mails from the bubba server.
This identity is set to the identity that the ISP expects to see if I was using a client email tool such as evolution, i.e. username@btinternet.com.
/Carl
-
- Posts: 39
- Joined: 22 Apr 2007, 03:01
- Location: Great Britain
-
- Posts: 39
- Joined: 22 Apr 2007, 03:01
- Location: Great Britain
Spoke too soon.
Unfortunately, postfix returns an unaccepted e-mail to the sender with from=<>, which is then rejected by my ISP. The log is:
Sep 27 17:24:37 bubba postfix/local[21347]: C443D2420287: to=<localuser@localhost>, relay=local, delay=1, status=bounced (data format error)
Sep 27 17:24:37 bubba postfix/cleanup[21346]: 7A0712420289: message-id=<20080927162437.7A0712420289@bubba.localdomain>
Sep 27 17:24:37 bubba postfix/qmgr[21326]: 7A0712420289: from=<>, size=3605, nrcpt=1 (queue active)
Sep 27 17:24:37 bubba postfix/qmgr[21326]: C443D2420287: removed
Sep 27 17:24:38 bubba postfix/smtp[21355]: 7A0712420289: to=<myusername@btinternet.com>, relay=mail.btinternet.com[217.146.188.192], delay=1, status=bounced (host mail.btinternet.com[217.146.188.192] said: 553 From: address not verified; see http://help.yahoo.com/l/us/yahoo/mail/o ... om-07.html (in reply to MAIL FROM command))
The "from" should actually be the local user to whom the e-mail was sent.
Any ideas?
Unfortunately, postfix returns an unaccepted e-mail to the sender with from=<>, which is then rejected by my ISP. The log is:
Sep 27 17:24:37 bubba postfix/local[21347]: C443D2420287: to=<localuser@localhost>, relay=local, delay=1, status=bounced (data format error)
Sep 27 17:24:37 bubba postfix/cleanup[21346]: 7A0712420289: message-id=<20080927162437.7A0712420289@bubba.localdomain>
Sep 27 17:24:37 bubba postfix/qmgr[21326]: 7A0712420289: from=<>, size=3605, nrcpt=1 (queue active)
Sep 27 17:24:37 bubba postfix/qmgr[21326]: C443D2420287: removed
Sep 27 17:24:38 bubba postfix/smtp[21355]: 7A0712420289: to=<myusername@btinternet.com>, relay=mail.btinternet.com[217.146.188.192], delay=1, status=bounced (host mail.btinternet.com[217.146.188.192] said: 553 From: address not verified; see http://help.yahoo.com/l/us/yahoo/mail/o ... om-07.html (in reply to MAIL FROM command))
The "from" should actually be the local user to whom the e-mail was sent.
Any ideas?
peter
yeah
try
Create the canonical file, which maps outgoing mail to a given email address
Code:
vi /etc/postfix/canonical
Add the following contents
Code:
eek@bubba.excito.com eek@myisp.com
you can check also
References
1. http://souptonuts.sourceforge.net/postfix_tutorial.html
2. http://www.postfix.org
3. http://forum.excito.net/viewtopic.php?p=3060
4. http://www.postfix.org/STANDARD_CONFIGU ... ml#fantasy
cheers
Eek
try
Create the canonical file, which maps outgoing mail to a given email address
Code:
vi /etc/postfix/canonical
Add the following contents
Code:
eek@bubba.excito.com eek@myisp.com
you can check also
References
1. http://souptonuts.sourceforge.net/postfix_tutorial.html
2. http://www.postfix.org
3. http://forum.excito.net/viewtopic.php?p=3060
4. http://www.postfix.org/STANDARD_CONFIGU ... ml#fantasy
cheers
Eek
-
- Posts: 39
- Joined: 22 Apr 2007, 03:01
- Location: Great Britain
Eek,
I have tried the canonical file. It makes no difference.
With the current setup, I am able to relay emails through my ISP and receive emails from my ISP successfully.
The problem comes when an email from my ISP fails its checks and is rejected. This happens because I am post-processing the email (using .forward) and returning an error code if it cannot be processed. In this case, the from field is set to <> which fails authentication at the ISP.
I have read somewhere that postfix does this to prevent backscatter. How would I change <> to the username@isp.com that my isp would recognise?
Thanks, Peter.
I have tried the canonical file. It makes no difference.
With the current setup, I am able to relay emails through my ISP and receive emails from my ISP successfully.
The problem comes when an email from my ISP fails its checks and is rejected. This happens because I am post-processing the email (using .forward) and returning an error code if it cannot be processed. In this case, the from field is set to <> which fails authentication at the ISP.
I have read somewhere that postfix does this to prevent backscatter. How would I change <> to the username@isp.com that my isp would recognise?
Thanks, Peter.
peter
-
- Posts: 39
- Joined: 22 Apr 2007, 03:01
- Location: Great Britain
I use the server to control my house - lights, curtains and appliances. It is also linked in with the security system - which monitors doors, spaces, CO, fire and water - and is about to be linked with environmental and energy sensors.
By post processing email sent to a specific user then I can command the server to carry out actions. In addition, I can get the server to email me when it detects events.
Within ~user/.forward, I use a | command to call an external shell script. This exits with a 0 to indicate success or an error code >= 1 to indicate failure. Postfix then handles the exit code. Within the script, I check that the email contents are valid and then task the server to carry out the action.
As this is carried out within a specific user space so I would expect Postfix to flag failure return as from the user.
Correctly formatted emails do get the server to issues the correct actions. Also the script does detect problems and return error codes. Postfix picks up the error code, e.g. data format error in the previous log but fails to pick up the from field.
By post processing email sent to a specific user then I can command the server to carry out actions. In addition, I can get the server to email me when it detects events.
Within ~user/.forward, I use a | command to call an external shell script. This exits with a 0 to indicate success or an error code >= 1 to indicate failure. Postfix then handles the exit code. Within the script, I check that the email contents are valid and then task the server to carry out the action.
As this is carried out within a specific user space so I would expect Postfix to flag failure return as from the user.
Correctly formatted emails do get the server to issues the correct actions. Also the script does detect problems and return error codes. Postfix picks up the error code, e.g. data format error in the previous log but fails to pick up the from field.
peter
-
- Posts: 39
- Joined: 22 Apr 2007, 03:01
- Location: Great Britain
I have found a fix to this now.
I still have postfix successfully delivering post to the local user, which is then processed according to the .forward file. This worked well before.
Now, as a result of processing the email, I send a specific email back to the sender indicating success or the identified error. I am then able to specify the 'from' parameter using sendmail such that it is authenticated by my ISP. Now the .forward processing always exits with a success code (0) such that postfix does not have to bounce the email back to the sender.
I can provide the processing code if anyone is interested.
Peter.
I still have postfix successfully delivering post to the local user, which is then processed according to the .forward file. This worked well before.
Now, as a result of processing the email, I send a specific email back to the sender indicating success or the identified error. I am then able to specify the 'from' parameter using sendmail such that it is authenticated by my ISP. Now the .forward processing always exits with a success code (0) such that postfix does not have to bounce the email back to the sender.
I can provide the processing code if anyone is interested.
Peter.
peter