Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Sun Feb 06, 2011 2:06 pm 
Offline
Junior Member

Joined: Thu Dec 16, 2010 4:02 pm
Posts: 21
Website: http://www.onlythebible.com
I've followed the postfix guide (http://library.linode.com/email/postfix/dovecot-mysql-ubuntu-10.04-lucid) to the letter (I think) and installed postfix, dovecot and saslauthd. I've setup my domains and users and I can receive emails perfectly fine, but I can't send them. I think there's problems trying to connect to the SMTP server or something?

In Roundcube I get this error message:

SMTP Error (554): Failed to add recipient "email@example.com" (5.7.1 : Relay access denied)

I've also tried using two other (windows) email clients which can both receive emails fine but can't connect to the SMTP server.

Here's the results of a telnet:

Code:
telnet localhost 25
ehlo localhost
250-li244-40.members.linode.com
250-PIPELINING
250-SIZE 30720000
250-VRFY
250-ETRN
250-STARTTLS
250-AUTH PLAIN LOGIN
250-AUTH=PLAIN LOGIN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN


Here's my postfix main.cf file:

Code:
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no

append_dot_mydomain = no

smtpd_tls_cert_file = /etc/postfix/smtpd.cert
smtpd_tls_key_file = /etc/postfix/smtpd.key
smtpd_use_tls = yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache

myhostname = li244-40.members.linode.com
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = li244-40.members.linode.com, localhost, localhost.localdomain
relayhost =
mynetworks = 127.0.0.0/8
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
html_directory = /usr/share/doc/postfix/html
message_size_limit = 30720000
virtual_alias_domains =
virtual_alias_maps = proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf, mysql:/etc/postfix/mysql-virtual_email2email.cf
virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql-virtual_domains.cf
virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cf
virtual_mailbox_base = /home/vmail
virtual_uid_maps = static:5000
virtual_gid_maps = static:5000
smtpd_sasl_auth_enable = yes
broken_sasl_auth_clients = yes
smtpd_sasl_authenticated_header = yes
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
virtual_create_maildirsize = yes
virtual_maildir_extended = yes
proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $virtual_mailbox_limit_maps
virtual_transport = dovecot
dovecot_destination_recipient_limit = 1


Am I doing something wrong here? Or perhaps I'm using wrong settings in my mail client?

I've trying something like this:
SMTP server: li244-40.members.linode.com
SMTP Port: 25
SMTP Auth: Yes
Authentication: PLAIN

It doesn't even seem to connect to the smtp server...

Any help would be greatly appreciated. Thanks!


Last edited by Emmanuel2 on Mon Feb 07, 2011 3:08 am, edited 4 times in total.

Top
   
 Post subject:
PostPosted: Sun Feb 06, 2011 2:22 pm 
Offline
Junior Member

Joined: Thu Dec 16, 2010 4:02 pm
Posts: 21
Website: http://www.onlythebible.com
I've now managed to connect to the smtp server from my desktop mail client, but I get the same message as I got from roundcube "Relay Access Denied" when it tries to send an email


Top
   
 Post subject:
PostPosted: Sun Feb 06, 2011 3:53 pm 
Offline
Senior Member

Joined: Fri Dec 07, 2007 1:37 am
Posts: 385
Location: NC, USA
It looks like your sasl isn't working - what do your logs say when you try to send an email?


Top
   
 Post subject:
PostPosted: Sun Feb 06, 2011 5:00 pm 
Offline
Junior Member

Joined: Thu Dec 16, 2010 4:02 pm
Posts: 21
Website: http://www.onlythebible.com
Here's a something from /var/log/mail.log

Code:
Feb  6 19:29:19 li244-40 postfix/smtpd[10658]: warning: 88.191.65.117: hostname 88-191-65-117.rev.dedibox.fr verification failed: Name or service not known
Feb  6 19:29:19 li244-40 postfix/smtpd[10658]: connect from unknown[88.191.65.117]
Feb  6 19:29:19 li244-40 postfix/smtpd[10658]: warning: non-SMTP command from unknown[88.191.65.117]: GET / HTTP/1.1
Feb  6 19:29:19 li244-40 postfix/smtpd[10658]: disconnect from unknown[88.191.65.117]


Otherwise there's lots of entries like this

Code:
Feb  6 19:14:06 li244-40 dovecot: imap-login: Login: user=<eman@onlythebible.com>, method=PLAIN, rip=173.255.234.40, lip=173.255.234.40, secured
Feb  6 19:14:06 li244-40 dovecot: IMAP(eman@onlythebible.com): Disconnected: Logged out bytes=63/492


Ah!, this bit could be what we're looking for:


Code:
Feb  6 19:07:14 li244-40 postfix/smtpd[10266]: connect from c114-77-115-211.chirn2.vic.optusnet.com.au[114.77.115.211]
Feb  6 19:07:16 li244-40 postfix/smtpd[10266]: warning: SASL authentication failure: cannot connect to saslauthd server: No such file or directory
Feb  6 19:07:16 li244-40 postfix/smtpd[10266]: warning: c114-77-115-211.chirn2.vic.optusnet.com.au[114.77.115.211]: SASL LOGIN authentication failed: gener$
Feb  6 19:07:17 li244-40 postfix/smtpd[10266]: NOQUEUE: reject: RCPT from c114-77-115-211.chirn2.vic.optusnet.com.au[114.77.115.211]: 554 5.7.1 <emmanuelhi$
Feb  6 19:07:19 li244-40 postfix/smtpd[10266]: disconnect from c114-77-115-211.chirn2.vic.optusnet.com.au[114.77.115.211]
Feb  6 19:09:21 li244-40 dovecot: dovecot: SIGHUP received - reloading configuration
Feb  6 19:09:22 li244-40 dovecot: auth-worker(default): mysql: Connected to 127.0.0.1 (mail)
Feb  6 19:09:31 li244-40 postfix/smtpd[10319]: connect from c114-77-115-211.chirn2.vic.optusnet.com.au[114.77.115.211]
Feb  6 19:09:33 li244-40 postfix/smtpd[10319]: warning: SASL authentication failure: cannot connect to saslauthd server: No such file or directory
Feb  6 19:09:33 li244-40 postfix/smtpd[10319]: warning: c114-77-115-211.chirn2.vic.optusnet.com.au[114.77.115.211]: SASL LOGIN authentication failed: gener$
Feb  6 19:09:33 li244-40 postfix/smtpd[10319]: NOQUEUE: reject: RCPT from c114-77-115-211.chirn2.vic.optusnet.com.au[114.77.115.211]: 554 5.7.1 <emmanuelhi$
Feb  6 19:09:35 li244-40 postfix/smtpd[10319]: disconnect from c114-77-115-211.chirn2.vic.optusnet.com.au[114.77.115.211]
Feb  6 19:09:53 li244-40 dovecot: dovecot: SIGHUP received - reloading configuration
Feb  6 19:09:53 li244-40 dovecot: auth-worker(default): mysql: Connected to 127.0.0.1 (mail)


This bit
Quote:
Feb 6 19:07:16 li244-40 postfix/smtpd[10266]: warning: SASL authentication failure: cannot connect to saslauthd server: No such file or directory
looks like the problem.
So there must be something wrong with the saslauthd server?


Top
   
 Post subject:
PostPosted: Sun Feb 06, 2011 7:39 pm 
Offline
Senior Member

Joined: Sun Mar 07, 2010 7:47 pm
Posts: 1970
Website: http://www.rwky.net
Location: Earth
Looks like it, first try

service saslauthd restart

if that doesn't work try running through http://library.linode.com/email/postfix ... _use_mysql again

_________________
Paid support
How to ask for help
1. Give details of your problem
2. Post any errors
3. Post relevant logs.
4. Don't hide details i.e. your domain, it just makes things harder
5. Be polite or you'll be eaten by a grue


Top
   
 Post subject:
PostPosted: Sun Feb 06, 2011 9:26 pm 
Offline
Junior Member

Joined: Thu Dec 16, 2010 4:02 pm
Posts: 21
Website: http://www.onlythebible.com
Okay, Tried "service saslauthd restart", which did this:

Code:
 * Stopping SASL Authentication Daemon saslauthd                    [ OK ]
 * Starting SASL Authentication Daemon saslauthd                    [ OK ]


Yes, and then I carefully went through that section of the tutorial, but nothing has changed :(


Top
   
 Post subject:
PostPosted: Sun Feb 06, 2011 11:49 pm 
Offline
Senior Member

Joined: Sun Mar 07, 2010 7:47 pm
Posts: 1970
Website: http://www.rwky.net
Location: Earth
Well that about covers the extent of my mail server knowledge (don't run one, never have), so I'll have to defer to someone who does.

_________________
Paid support
How to ask for help
1. Give details of your problem
2. Post any errors
3. Post relevant logs.
4. Don't hide details i.e. your domain, it just makes things harder
5. Be polite or you'll be eaten by a grue


Top
   
 Post subject:
PostPosted: Mon Feb 07, 2011 2:44 am 
Offline
Junior Member

Joined: Thu Dec 16, 2010 4:02 pm
Posts: 21
Website: http://www.onlythebible.com
Okay, well thanks for trying.

I still haven't figured it out. :(


Top
   
 Post subject:
PostPosted: Mon Feb 07, 2011 2:56 am 
Offline
Junior Member

Joined: Thu Dec 16, 2010 4:02 pm
Posts: 21
Website: http://www.onlythebible.com
Okay, now I'm getting another slightly different error message. Probably related to the same problem though:

Code:
Feb  7 06:53:11 li244-40 postfix/smtpd[16108]: warning: c114-77-115-211.chirn2.vic.optusnet.com.au[114.77.115.211]: SASL LOGIN authentication failed: authentication failure


Top
   
 Post subject:
PostPosted: Mon Feb 07, 2011 3:11 am 
Offline
Junior Member

Joined: Thu Dec 16, 2010 4:02 pm
Posts: 21
Website: http://www.onlythebible.com
Problem Solved!

Ended up uncommenting the following lines from the /etc/postfix/master.cf file

Code:
  -o smtpd_sasl_auth_enable=yes
  -o smtpd_client_restrictions=permit_sasl_authenticated,reject


As well as adding this new line

Code:
submission inet n - n - - smtpd


Now it works like a charm, the host rejected error was just because I had the wrong password.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group