Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Server Operation

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 2nd January 2013, 05:12
abcinc abcinc is offline
Junior Member
 
Join Date: Jan 2013
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default 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,

Last edited by abcinc; 2nd January 2013 at 05:45. Reason: update
Reply With Quote
Sponsored Links
  #2  
Old 2nd January 2013, 15:17
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,745 Times in 2,578 Posts
Default

Are there any errors in your mail log (in the /var/log/ directory)?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #3  
Old 2nd January 2013, 17:31
abcinc abcinc is offline
Junior Member
 
Join Date: Jan 2013
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default

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

Last edited by abcinc; 3rd January 2013 at 20:57. Reason: updated
Reply With Quote
  #4  
Old 3rd January 2013, 15:22
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,745 Times in 2,578 Posts
Default

Can you post a log excerpt from the time where you send an email to your server?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #5  
Old 3rd January 2013, 15:26
abcinc abcinc is offline
Junior Member
 
Join Date: Jan 2013
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
 
Default

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

Last edited by abcinc; 4th January 2013 at 20:23. Reason: update
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
ISPConfig 3 - MultiServer Setup - With Dedicated Control Panel - How? SuperJC Installation/Configuration 4 16th October 2012 20:03
Dual server with ISPConfig 3 but with errors alphaman36 Installation/Configuration 8 23rd August 2012 12:59
mail recipient linux_red Installation/Configuration 6 9th March 2012 14:24
MySQL Error Nolan Installation/Configuration 12 16th February 2011 02:15
Email Sending and receiving problems kennethwu Server Operation 1 7th January 2011 13:57


All times are GMT +2. The time now is 19:03.


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