Relay access denied when using SMTP to external recipients

Discussion in 'Installation/Configuration' started by Kamran Shah, Oct 10, 2005.

  1. miththu

    miththu New Member

    So postfix to work fine fonaly i use this into my lan, but when i go out of my office and i to connect width my notebook by dialup internt connection i can't to send email to external at my domain, becouse i recived the error 554 relay access denied
     
  2. j.smith1981

    j.smith1981 New Member

    Im having a much the same problem.

    This is the error I am getting:

    But when I try and send using my working computer (the one I work off to create solutions to things etc) it comes up with the above message, but when I tried going to send a test email to my gmail.com address from work, it works fine.

    Can someone shed some light on as to why this should work and the one from my LAN doesnt?

    Its kinda weird lol, any helps wonderfully appreciated though as usual!

    Jeremy.
     
  3. falko

    falko Super Moderator Howtoforge Staff

    Please make sure that "Server requires authentication" is enabled in your email client.
     
  4. j.smith1981

    j.smith1981 New Member

    How come this didnt happen before?

    Like previously I used to send out emails without having to do this, just curious really though not complaining (have always generally done that anyways so doesnt really bother me).

    Anyways take care and thanks,
    Jez
     
  5. falko

    falko Super Moderator Howtoforge Staff

    If the client PC is listed in mynetworks in /etc/postfix/main.cf, then the client PC doesn't have to authenticate.
     
  6. j.smith1981

    j.smith1981 New Member

    Ahh ok, but (not that I have been making notes if I have or not being doing this lol), but did this start just happening or would it always have done?

    Just out of interest.

    Very informative though thanks falko, your a pure genius!
     
  7. billykk

    billykk New Member

    Virtual Domain can't send to outside

    Dear All

    I am a newbie of postfix .
    now I have a mail server using Virtual Users And Domains With Postfix, Courier And MySQL (+ SMTP-AUTH, Quota, SpamAssassin, ClamAV) on Ubuntu 10.0.4.

    First everything working fine if I using only a single domain(ex: primary.com) .
    but after that I hosting a virtual domain (ex, myvirtual.com), myvirtual.com can revice email but can't send to outside world (and I got error msg like below )
    Dec 26 11:34:35 mail postfix/smtpd[1741]: NOQUEUE: reject: RCPT from unknown[203.144.95.155]: 554 5.7.1 <[email protected]>: Relay access denied; from=<[email protected]> to=<[email protected]> proto=ESMTP helo=<BlueSky007>

    any one please help me to resolve this problem .

    I am looking forwards to hearing from you soon.
    Thank you beforehand
    :confused:
     
  8. falko

    falko Super Moderator Howtoforge Staff

    Did you enable "Server requires authentication" in your email client?
     
  9. kmullen

    kmullen New Member

    Same problem here. Relay access denied.

    This server has been running for over 6 months with no issues. About 5 days ago my customers were no longer able to send emails.

    Yes, they all have "My outbound server requires authentication", and have had since the beginning.

    There have been no updates installed for about 2 months.

    Used tutorial at http://www.howtoforge.com/perfect-server-ubuntu-10.10-maverick-meerkat-ispconfig-3

    The Outlook Clients pass the "Send/Receive" test built into the client, but continue to receive Relay access denied.

    Ubuntu Server 10.10
    ISPConfig 3
     
  10. falko

    falko Super Moderator Howtoforge Staff

    Are there any errors in your mail log (in the /var/log/ directory)?
     
  11. kmullen

    kmullen New Member

    mail.err log

    This is the mail.err log:

    Jan 7 16:47:34 ISPCONFIG authdaemond: failed to connect to mysql server (server=localhost, userid=ispconfig): Can't connect to local MySQL server through s$
    Jan 7 16:47:34 ISPCONFIG pop3d: authentication error: Input/output error
    Jan 7 16:47:38 ISPCONFIG authdaemond: failed to connect to mysql server (server=localhost, userid=ispconfig): Can't connect to local MySQL server through s$
    Jan 7 16:47:38 ISPCONFIG pop3d: authentication error: Input/output error
    Jan 7 16:48:04 ISPCONFIG authdaemond: failed to connect to mysql server (server=localhost, userid=ispconfig): Can't connect to local MySQL server through s$
    Jan 7 16:48:04 ISPCONFIG pop3d: authentication error: Input/output error
    Jan 7 16:49:27 ISPCONFIG authdaemond: failed to connect to mysql server (server=localhost, userid=ispconfig): Can't connect to local MySQL server through s$
    Jan 7 16:49:27 ISPCONFIG pop3d: authentication error: Input/output error
    Jan 7 16:50:02 ISPCONFIG amavis[1031]: (01031-01) (!!)TROUBLE in process_request: connect_to_sql: unable to connect to any dataset at (eval 115) line 241, $
    Jan 7 16:50:02 ISPCONFIG postfix/smtp[2377]: fatal: mysql:/etc/postfix/mysql-virtual_relaydomains.cf(0,lock|fold_fix): table lookup problem
    Jan 7 16:50:03 ISPCONFIG postfix/error[2380]: fatal: mysql:/etc/postfix/mysql-virtual_relaydomains.cf(0,lock|fold_fix): table lookup problem
    Jan 7 16:50:04 ISPCONFIG postfix/qmgr[1723]: fatal: mysql:/etc/postfix/mysql-virtual_relaydomains.cf(0,lock|fold_fix): table lookup problem
    Jan 7 17:01:44 ISPCONFIG postfix/smtp[2884]: fatal: mysql:/etc/postfix/mysql-virtual_relaydomains.cf(0,lock|fold_fix): table lookup problem
    Jan 7 17:01:45 ISPCONFIG postfix/error[2923]: fatal: mysql:/etc/postfix/mysql-virtual_relaydomains.cf(0,lock|fold_fix): table lookup problem
    Jan 7 17:01:46 ISPCONFIG postfix/qmgr[2444]: fatal: mysql:/etc/postfix/mysql-virtual_relaydomains.cf(0,lock|fold_fix): table lookup problem
    Jan 7 17:03:25 ISPCONFIG authdaemond: failed to connect to mysql server (server=localhost, userid=ispconfig): Can't connect to local MySQL server through s$
    Jan 7 17:03:25 ISPCONFIG pop3d: authentication error: Input/output error
    Jan 7 17:03:50 ISPCONFIG authdaemond: failed to connect to mysql server (server=localhost, userid=ispconfig): Can't connect to local MySQL server through s$
    Jan 7 17:03:50 ISPCONFIG pop3d: authentication error: Input/output error
    Jan 7 17:03:52 ISPCONFIG authdaemond: failed to connect to mysql server (server=localhost, userid=ispconfig): Can't connect to local MySQL server through s$
    Jan 7 17:03:52 ISPCONFIG pop3d: authentication error: Input/output error
    Jan 7 17:03:53 ISPCONFIG authdaemond: failed to connect to mysql server (server=localhost, userid=ispconfig): Can't connect to local MySQL server through s$
    Jan 7 17:03:53 ISPCONFIG pop3d: authentication error: Input/output error
    Jan 7 17:03:56 ISPCONFIG authdaemond: failed to connect to mysql server (server=localhost, userid=ispconfig): Can't connect to local MySQL server through s$
    Jan 7 17:03:56 ISPCONFIG pop3d: authentication error: Input/output error
    Jan 7 17:08:19 ISPCONFIG authdaemond: failed to connect to mysql server (server=localhost, userid=ispconfig): Can't connect to local MySQL server through s$
    Jan 7 17:08:19 ISPCONFIG pop3d: authentication error: Input/output error
    Jan 7 17:37:55 ISPCONFIG postfix/trivial-rewrite[2867]: fatal: proxy:mysql:/etc/postfix/mysql-virtual_domains.cf(0,lock|fold_fix): table lookup problem
    Jan 7 17:37:57 ISPCONFIG postfix/trivial-rewrite[3538]: fatal: proxy:mysql:/etc/postfix/mysql-virtual_domains.cf(0,lock|fold_fix): table lookup problem
     
  12. falko

    falko Super Moderator Howtoforge Staff

    What's the output of
    Code:
    netstat -tap
    ?
     
  13. kmullen

    kmullen New Member

    Netstat results

    root@ISPCONFIG:/# netstat -tap
    Active Internet connections (servers and established)
    Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
    tcp 0 0 localhost.localdo:10024 *:* LISTEN 962/amavisd (master
    tcp 0 0 localhost.localdo:10025 *:* LISTEN 12356/master
    tcp 0 0 *:mysql *:* LISTEN 3544/mysqld
    tcp 0 0 *:submission *:* LISTEN 12356/master
    tcp 0 0 localhost.localdo:spamd *:* LISTEN 974/spamd.pid
    tcp 0 0 *:http-alt *:* LISTEN 1744/apache2
    tcp 0 0 *:www *:* LISTEN 1744/apache2
    tcp 0 0 *:ssmtp *:* LISTEN 12356/master
    tcp 0 0 *:tproxy *:* LISTEN 1744/apache2
    tcp 0 0 *:2323 *:* LISTEN 9173/sshd
     
  14. kmullen

    kmullen New Member

    Here is the total output

    root@ISPCONFIG:/# netstat -top
    Active Internet connections (w/o servers)
    Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name Timer
    ^C
    root@ISPCONFIG:/# netstat -tap
    Active Internet connections (servers and established)
    Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
    tcp 0 0 localhost.localdo:10024 *:* LISTEN 962/amavisd (master
    tcp 0 0 localhost.localdo:10025 *:* LISTEN 12356/master
    tcp 0 0 *:mysql *:* LISTEN 3544/mysqld
    tcp 0 0 *:submission *:* LISTEN 12356/master
    tcp 0 0 localhost.localdo:spamd *:* LISTEN 974/spamd.pid
    tcp 0 0 *:http-alt *:* LISTEN 1744/apache2
    tcp 0 0 *:www *:* LISTEN 1744/apache2
    tcp 0 0 *:ssmtp *:* LISTEN 12356/master
    tcp 0 0 *:tproxy *:* LISTEN 1744/apache2
    tcp 0 0 *:2323 *:* LISTEN 9173/sshd
    tcp 0 0 192.168.15.130:domain *:* LISTEN 822/named
    tcp 0 0 ISPCONFIG.practi:domain *:* LISTEN 822/named
    tcp 0 0 localhost.locald:domain *:* LISTEN 822/named
    tcp 0 0 *:smtp *:* LISTEN 12356/master
    tcp 0 0 localhost.localdoma:953 *:* LISTEN 822/named
    tcp 0 0 *:https *:* LISTEN 1744/apache2
    tcp 0 0 localhost.localdo:53859 localhost.localdo:mysql TIME_WAIT -
    tcp 0 0 localhost.localdo:mysql localhost.localdo:53870 ESTABLISHED 3544/mysqld
    tcp 0 0 localhost.localdo:53866 localhost.localdo:mysql ESTABLISHED 11936/error
    tcp 0 0 localhost.localdo:53862 localhost.localdo:mysql ESTABLISHED 11927/smtp
    tcp 0 0 localhost.localdo:53868 localhost.localdo:mysql ESTABLISHED 11941/error
    tcp 0 0 localhost.localdo:mysql localhost.localdo:36076 ESTABLISHED 3544/mysqld
    tcp 0 0 localhost.localdo:53858 localhost.localdo:mysql TIME_WAIT -
    tcp 0 0 localhost.localdo:mysql localhost.localdo:53867 ESTABLISHED 3544/mysqld
    tcp 0 52 ISPCONFIG.practica:2323 206.109.239.51:2927 ESTABLISHED 11865/sshd: adminis
    tcp 0 0 localhost.localdo:53867 localhost.localdo:mysql ESTABLISHED 11939/error
    tcp 0 0 localhost.localdo:53870 localhost.localdo:mysql ESTABLISHED 11937/error
    tcp 0 0 localhost.localdo:53865 localhost.localdo:mysql ESTABLISHED 11928/smtp
    tcp 0 0 localhost.localdo:40483 localhost.localdo:mysql ESTABLISHED 29964/amavisd (ch10
    tcp 0 0 localhost.localdo:mysql localhost.localdo:40483 ESTABLISHED 3544/mysqld
    tcp 0 0 localhost.localdo:mysql localhost.localdo:53865 ESTABLISHED 3544/mysqld
    tcp 0 0 localhost.localdo:mysql localhost.localdo:53869 ESTABLISHED 3544/mysqld
    tcp 0 0 localhost.localdo:mysql localhost.localdo:53868 ESTABLISHED 3544/mysqld
    tcp 0 0 localhost.localdo:53863 localhost.localdo:mysql ESTABLISHED 11926/smtp
    tcp 0 0 localhost.localdo:36076 localhost.localdo:mysql ESTABLISHED 6209/amavisd (ch4-a
    tcp 0 0 localhost.localdo:53869 localhost.localdo:mysql ESTABLISHED 11929/smtp
    tcp 0 0 localhost.localdo:mysql localhost.localdo:53863 ESTABLISHED 3544/mysqld
    tcp 0 0 localhost.localdo:mysql localhost.localdo:53862 ESTABLISHED 3544/mysqld
    tcp 0 0 localhost.localdo:mysql localhost.localdo:53864 ESTABLISHED 3544/mysqld
    tcp6 0 0 [::]:imaps [::]:* LISTEN 1521/couriertcpd
    tcp6 0 0 [::]:pop3s [::]:* LISTEN 1555/couriertcpd
    tcp6 0 0 [::]:pop3 [::]:* LISTEN 1535/couriertcpd
    tcp6 0 0 [::]:imap2 [::]:* LISTEN 1501/couriertcpd
    tcp6 0 0 [::]:2323 [::]:* LISTEN 9173/sshd
    tcp6 0 0 [::]:domain [::]:* LISTEN 822/named
    tcp6 0 0 localhost:953 [::]:* LISTEN 822/named
    getnameinfo failed
    tcp6 0 0 ISPCONFIG.practic:imap2 [UNKNOWN]:5102 ESTABLISHED 10854/couriertls
    getnameinfo failed
    tcp6 0 0 ISPCONFIG.practic:imap2 [UNKNOWN]:58873 ESTABLISHED 12146/imapd
    getnameinfo failed
    tcp6 0 0 ISPCONFIG.practic:imap2 [UNKNOWN]:61655 ESTABLISHED 9639/couriertls
    getnameinfo failed
    tcp6 0 0 ISPCONFIG.practic:imap2 [UNKNOWN]:57854 ESTABLISHED 2669/imapd
    getnameinfo failed
    tcp6 0 0 ISPCONFIG.practica:pop3 [UNKNOWN]:64999 TIME_WAIT -
     
  15. kmullen

    kmullen New Member

    This might be the problem.

    Jan 9 19:10:03 ISPCONFIG postfix/smtp[12717]: 9D04220682: to=, relay=none, delay=0.12, delays=0.07/0.02/0.04/0, dsn=5.4.4, status=bounced (Host or domain name not found. Name service error for name=ISPCONFIG.familymullen.org type=A: Host not found)

    "familymullen.org" was the name assigned to the server when I installed ISPCONFIG at home.

    I have checked the following files and the hostname is correct.
    /etc/hostname, /etc/hosts

    The domain, familymullen.org is not hosted on this server.
     
  16. falko

    falko Super Moderator Howtoforge Staff

    Can you check if all your mysql*.cf files in the /etc/postfix/ directory use the line
    Code:
    hosts = 127.0.0.1
    instead of
    Code:
    hosts = localhost
    ?
     
  17. kmullen

    kmullen New Member

    All of the mysql*.cf files use the line:

    Hosts = 127.0.0.1

    Files checked:


    root@ISPCONFIG:/# find -name mysql*.cf
    ./etc/postfix/mysql-virtual_mailboxes.cf
    ./etc/postfix/mysql-virtual_email2email.cf
    ./etc/postfix/mysql-virtual_domains.cf
    ./etc/postfix/mysql-virtual_relayrecipientmaps.cf
    ./etc/postfix/mysql-virtual_recipient.cf
    ./etc/postfix/mysql-virtual_relaydomains.cf
    ./etc/postfix/mysql-virtual_client.cf
    ./etc/postfix/mysql-virtual_transports.cf
    ./etc/postfix/mysql-virtual_forwardings.cf
    ./etc/postfix/mysql-virtual_sender.cf
     
  18. falko

    falko Super Moderator Howtoforge Staff

    That's ok. Do you still have MySQL errors in your mail log?

    Please create an A record for ISPCONFIG.familymullen.org.
     
  19. kmullen

    kmullen New Member

    I will do that but that domain is hosted on a different server at another location.
     
  20. kmullen

    kmullen New Member

    Still seeing this.

    Jan 10 19:38:23 ISPCONFIG postfix/smtpd[22472]: warning: SASL authentication failure: cannot connect to saslauthd server: No such file or directory
    Jan 10 19:38:23 ISPCONFIG postfix/smtpd[22472]: warning: wsip-70-167-114-111.sd.sd.cox.net[70.167.114.111]: SASL LOGIN authentication failed: generic failure
    Jan 10 19:38:33 ISPCONFIG postfix/smtpd[22460]: warning: SASL authentication failure: cannot connect to saslauthd server: No such file or directory
    Jan 10 19:38:33 ISPCONFIG postfix/smtpd[22460]: warning: wsip-70-167-114-111.sd.sd.cox.net[70.167.114.111]: SASL LOGIN authentication failed: generic failure

    Not seeing SQL error in mail.err log
     

Share This Page