LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   mail transport unavailable -- PLease help (https://www.linuxquestions.org/questions/linux-server-73/mail-transport-unavailable-please-help-887474/)

andycol 06-21-2011 02:04 AM

mail transport unavailable -- PLease help
 
So i have decided to setup Virtual hosting but i can not relay mail through

This is the error i get.

Jun 21 09:00:51 Cyberia postfix/qmgr[11507]: warning: connect to transport amavis: Connection refused
Jun 21 09:00:51 Cyberia postfix/qmgr[11507]: 5F8147CE7: from=<root@moodle.localdomain>, size=1823, nrcpt=1 (queue active)
/0/0.01, dsn=4.3.0, status=deferred (mail transport unavailable)
Jun 21 09:00:51 Cyberia postfix/error[11511]: 5BB797CE3: to=<andrew@bitco.co.za>, relay=none, delay=41804, delays=41804/0/0/0.01, dsn=4.3.0, status=deferred (mail transport unavailable)


also when i send to the server i get this

Jun 20 21:40:13 Cyberia postfix/qmgr[10440]: 6B9827CEF: from=<andrew.colin@iafrica.com>, size=605, nrcpt=1 (queue active)
Jun 20 21:40:16 Cyberia postfix/pickup[10439]: 793197CF1: uid=5001 from=<andrew.colin@iafrica.com>
Jun 20 21:40:16 Cyberia postfix/pipe[10451]: 6B9827CEF: to=<andrew@nutxase.co.za>, relay=spamassassin, delay=3.1, delays=0.06/0/0/3, dsn=2.0.0, status=sent (delivered via spamassassin service)
Jun 20 21:40:16 Cyberia postfix/qmgr[10440]: 793197CF1: from=<andrew.colin@iafrica.com>, size=716, nrcpt=1 (queue active)
Jun 20 21:40:16 Cyberia postfix/local[10455]: 793197CF1: to=<andrew@nutxase.co.za>, relay=local, delay=0.03, delays=0.01/0/0/0.01, dsn=5.1.1, status=bounced (unknown user: "andrew")

Noway2 06-21-2011 04:56 AM

Quote:

Jun 21 09:00:51 Cyberia postfix/qmgr[11507]: warning: connect to transport amavis: Connection refused
Jun 21 09:00:51 Cyberia postfix/qmgr[11507]: 5F8147CE7: from=<root@moodle.localdomain>, size=1823, nrcpt=1 (queue active)
/0/0.01, dsn=4.3.0, status=deferred (mail transport unavailable)
Jun 21 09:00:51 Cyberia postfix/error[11511]: 5BB797CE3: to=<andrew@bitco.co.za>, relay=none, delay=41804, delays=41804/0/0/0.01, dsn=4.3.0, status=deferred (mail transport unavailable)
The error message(s) indicate that Postfix is attempting to filter the mail through Amavis, which is a fairly normal practice. One of the problems appears to be that Amavis is either not running, or is not bound to the correct ports as configured through your Postfix master.cf, main.cf and Amavis configuration.

The other problem I see is that it looks like you have a problem with the domains being handled and what Postfix thinks is the host name and what domains it thinks it is supposed to receive for. You have: to=<andrew@bitco.co.za> and to=<andrew@nutxase.co.za>. Postfix will attempt to deliver for those domains specified in mydestinations. All others it will attempt to do a domain lookup and send to that domain. Depending on how you have the sender restrictions set, e.g. permit my_networks, permit SASL authenticated, etc, and where the message is originating it may try to send or it may bounce on authentication. In this case, <andrew@nutxase.co.za>, bounced, which means that Postfix thinks that it is supposed to deliver for nutxase.co.za, but there is no andrew user.

In order to use virtual users, you will need to have the proper SQL configuration files and reference them in your main.cf. These will contain the lookup strings to verify the user for Postfix. The SQL tables must be in the proper format to match this and so forth. Typically I use the tool Postfixadmin (php based web app) to handle creating the user accounts as it puts them in the correct format for me.

I would recommend that you turn on debugging, including password debugging in Postfix and your POP/IMAP program, which is what Postfix will use to handle SASL authentication. Your log files should then give you a lot more information regarding the problem. Be sure to restart your services, check to see if the applications are running and listening on the proper ports and then test. You might even want to start with a telnet test for SMTP rather than trying to connect through a mail client to eliminate some variables.

andycol 06-21-2011 06:34 AM

i managed to fix it thanks :)

now i get this error

Jun 21 13:31:21 tornado dovecot: imap-login: Aborted login (2 authentication attempts): user=<andrew@nutxase.co.za>, method=PLAIN, rip=x.x.x.x, lip=x.x.x.x.
Jun 21 13:31:21 tornado dovecot: imap-login: Aborted login (0 authentication attempts)

and thunderbird etc wont accept my password?
any ideas?

Noway2 06-21-2011 07:37 AM

This sounds like a mis-match between the user + password in your SQL database vs what is being transmitted and received by Dovecot. Sometimes this can be fixed with an adjustment to the Dovecot SQL configuration. To find out what is happening, there are three lines in dovecot that you can enable to show you what it is doing. This should show you what the problem is and hopefully, in turn, how to solve it.

Code:

auth_verbose = yes
auth_debug = yes
auth_debug_passwords = yes


andycol 06-21-2011 07:49 AM

when i add those i get Jun 21 14:49:14 tornado dovecot: child 5887 (auth) returned error 89
Jun 21 14:49:14 tornado dovecot: Auth process died too early - shutting down

here is my dovecot-mysql.conf

driver = mysql
connect = host=localhost dbname=postfix user=postfix password=XXXX
default_pass_scheme = PLAIN
password_query = SELECT password FROM mailbox WHERE username = '%u'
user_query = SELECT maildir, 89 AS uid, 89 AS gid FROM mailbox WHERE username = '%u'


All times are GMT -5. The time now is 12:29 AM.