HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Server Operation (http://www.howtoforge.com/forums/forumdisplay.php?f=5)
-   -   Postfix, dovecot, mysql no email coming to mysql (http://www.howtoforge.com/forums/showthread.php?t=60086)

abcinc 2nd January 2013 05:12

Postfix, dovecot, mysql no email coming to mysql
 
I have ubuntu 10.04 with postfix, mysql dovecot and squirrelmail

All mail sent from outside to a client goes into a postfix mailbox and not to dovecot imap or squirrelmail. Both are using mysql.

main.cf from Postfix

myorigin = /etc/mailname
biff = no
append_dot_mydomain = no
readme_directory = no
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mynetworks_style = host
mailbox_size_limit = 0
virtual_mailbox_limit = 0
recipient_delimiter = +
message_size_limit = 0

# SMTP Authentication (SASL)

smtpd_sasl_auth_enable = yes
broken_sasl_auth_clients = yes
smtpd_sasl_security_options = noanonymous
smtpd_sasl_local_domain =

# Encrypted transfer (SSL/TLS)

smtp_use_tls = yes
smtpd_use_tls = yes
smtpd_tls_cert_file = /etc/ssl/private/mail5.mydomain.com,.crt
smtpd_tls_key_file = /etc/ssl/private/mail5.mydomain.com,.key
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache

# Basic SPAM prevention

smtpd_helo_required = yes
smtpd_delay_reject = yes
disable_vrfy_command = yes

# Force incoming mail to go through Amavis

content_filter = amavis:[127.0.0.1]:10024
receive_override_options = no_address_mappings

# Virtual user mappings

alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
virtual_mailbox_base = /var/spool/mail/virtual
virtual_mailbox_maps = mysql:/etc/postfix/maps/user.cf
virtual_uid_maps = static:5000
virtual_gid_maps = static:5000
virtual_alias_maps = mysql:/etc/postfix/maps/alias.cf
virtual_mailbox_domains = mysql:/etc/postfix/maps/domain.cf

smtpd_tls_loglevel = 1


mydestination = mydomain.com,mydomain1.com,mydomain2.com,

falko 2nd January 2013 15:17

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

abcinc 2nd January 2013 17:31

Hi Falko, thanks for looking. /var/log/mail.log has no new errors after sending an email to a user.

Hi I also found in var/mail the accounts where mail is going to postfix. Also a folder called virtual where two domain accounts which have mail going to mysql
also in /var/log/mail.warn there is this error. warning: do not list domain mydomain1.com in BOTH mydestination and virtual_alias_domains

However if I take mydomain1.com out from mydestination then send and email to mydomain1.com then I get this error in my gmail.
550 550 5.1.1 <me@mydomain1.com>: Recipient address rejected: User unknown in virtual alias table (state 13).

However that address is in mysql alias table

falko 3rd January 2013 15:22

Can you post a log excerpt from the time where you send an email to your server?

abcinc 3rd January 2013 15:26

The var/log/mail.log is empty every time so no data to post

Hi I also found in var/mail the accounts where mail is going to postfix. Also a folder called virtual where two domain accounts which have mail going to mysql
also in /var/log/mail.warn there is this error. warning: do not list domain mydomain1.com in BOTH mydestination and virtual_alias_domains

However if I take mydomain1.com out from mydestination then send and email to mydomain1.com then I get this error in my gmail.
550 550 5.1.1 <me@mydomain1.com>: Recipient address rejected: User unknown in virtual alias table (state 13).

However that address is in mysql alias table

here is the contents of etc/postfix/maps/alias.cf. The usrname and password for mysql login works fine
user=xxx
password=xxx
dbname=mail
table=alias
select_field=destination
where_field=source
hosts=127.0.0.1
additional_conditions=and enabled = 1


All times are GMT +2. The time now is 15:02.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.