PDA

View Full Version : Postfix: can't deliver mail


DazzyB
16th August 2007, 21:57
I have set up Postfix, MySQL, Courier etc etc... and everything looks good except that postfix can't deliver mail to local accounts

In webmin I get this status message in postfixes queue on an incoming mail:

connect to 127.0.0.1[127.0.0.1]: Connection refused.

Pls help.

Thanks,
Darren

thanis
17th August 2007, 00:27
Did you install any antispam/antivirus software like amavis, spamassassin and/or clamav ? If so, then it probably isn't running, or it isn't configured to allow mails from localhost.

Please give us some more info on the setup:
O.S. + version
output of main.cf
extra soft installed as av/spam ?

Thanks,
Thanis

DazzyB
17th August 2007, 13:14
Thanks Thanis

I followed the Postfix Virtual Domains/Users for Ubuntu Edgy How to here on howtoforge.com

I have Ubuntu 7.04 (Feisty)

Main.cf:

# See /usr/share/postfix/main.cf.dist for a commented, more complete version


# Debian specific: Specifying a file name will cause the first
# line of that file to be used as the name. The Debian default
# is /etc/mailname.
#myorigin = /etc/mailname

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

# appending .domain is the MUA's job.
append_dot_mydomain = no

# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h

# TLS parameters
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:${queue_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${queue_directory}/smtp_scache

# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.

myhostname = carterweb.za.net
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = carterweb.za.net, localhost, localhost.localdomain
relayhost = smtp.saix.net
mynetworks = 127.0.0.0/8
mailbox_size_limit = 0
recipient_delimiter = +
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_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
transport_maps = proxy:mysql:/etc/postfix/mysql-virtual_transports.cf
virtual_create_maildirsize = yes
virtual_mailbox_extended = yes
virtual_mailbox_limit_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailbox_limit_maps.cf
virtual_mailbox_limit_override = yes
virtual_maildir_limit_message = "The user you are trying to reach is over quota."
virtual_overquota_bounce = yes
proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $vir$
content_filter = amavis:[127.0.0.1]:10024
receive_override_options = no_address_mappings

Thanks,
Darren Carter

falko
17th August 2007, 18:11
What's the output of netstat -tap
and postconf -d | grep inet_interfaces?

DazzyB
17th August 2007, 19:31
netstat -tap
root@carterweb:~# 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:2208 *:* LISTEN 4893/hpiod
tcp 0 0 localhost:10024 *:* LISTEN 4838/amavisd (maste
tcp 0 0 localhost:10025 *:* LISTEN 5595/master
tcp 0 0 *:mysql *:* LISTEN 7050/mysqld
tcp 0 0 *:www *:* LISTEN 6187/apache2
tcp 0 0 *:webmin *:* LISTEN 5930/perl
tcp 0 0 carterweb.za.net:domain *:* LISTEN 4793/named
tcp 0 0 localhost:domain *:* LISTEN 4793/named
tcp 0 0 localhost:ipp *:* LISTEN 4869/cupsd
tcp 0 0 *:smtp *:* LISTEN 5595/master
tcp 0 0 localhost:953 *:* LISTEN 4793/named
tcp 0 0 localhost:2207 *:* LISTEN 4896/python
tcp 0 0 carterweb.za.net:mysql dazz-net.local:4527 ESTABLISHED7050/mysqld
tcp6 0 0 *:imaps *:* LISTEN 5467/couriertcpd
tcp6 0 0 *:pop3s *:* LISTEN 5508/couriertcpd
tcp6 0 0 localhost:8005 *:* LISTEN 9774/java
tcp6 0 0 *:8009 *:* LISTEN 9774/java
tcp6 0 0 *:pop3 *:* LISTEN 5483/couriertcpd
tcp6 0 0 *:imap2 *:* LISTEN 5444/couriertcpd
tcp6 0 0 *:8180 *:* LISTEN 9774/java
tcp6 0 0 *:domain *:* LISTEN 4793/named
tcp6 0 0 *:ssh *:* LISTEN 5649/sshd
tcp6 0 0 ip6-localhost:953 *:* LISTEN 4793/named
tcp6 0 592 carterweb.za.net:ssh ::ffff:192.168.1.3:4287 ESTABLISHED7331/1
root@carterweb:~#


postconf -d | grep inet_interfaces:
root@carterweb:~# postconf -d | grep inet_interfaces
inet_interfaces = all
local_header_rewrite_clients = permit_inet_interfaces
root@carterweb:~#


Thanks,
Darren carter

falko
18th August 2007, 12:56
The outputs look ok.

What's the output of telnet localhost 25 and then ehlo localhost? Any errors in your mail log?

DazzyB
18th August 2007, 20:12
mhm... it strangly just started working, I dunno what was wrong, but anyhoo...

Thanks