Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Installation/Configuration

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 5th October 2009, 22:12
uni uni is offline
Junior Member
 
Join Date: Oct 2009
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Virtual Users and Domains : Mail Loops back to Myself

I followed the Ubuntu 9.04 tutorial two different times now and I always get the Postfix, "Mail.example.com Loops back to myself" error so I was hoping for a little help. I've searched through all threads about this before posting, btw.

I'm wondering if my MySQL transport table has the right values.

Hostname = server1.example.com
MX record points = mail.example.com

I used 'mail.example.com' in all my configs (except where it reflected domain name, and I put in 'example.com')

Should my transport table value be:

source + destination
example.com + server1.example.com (changed but not tested yet)
example.com + mail.example.com (this does not work)


If there's anything else I can check, I'd appreciate some help as I'd really like to get this working.

Output of 'postconf -n'

Quote:
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
broken_sasl_auth_clients = yes
config_directory = /etc/postfix
content_filter = amavis:[127.0.0.1]:10024
html_directory = /usr/share/doc/postfix/html
inet_interfaces = all
mailbox_size_limit = 0
mydestination = mail.example.com, localhost, localhost.localdomain
myhostname = mail.example.com
mynetworks = 127.0.0.0/8
myorigin = /etc/mailname
proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $virtual_mailbox_limit_maps
readme_directory = /usr/share/doc/postfix
receive_override_options = no_address_mappings
recipient_delimiter = +
relayhost =
smtp_host_lookup = native
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sasl_authenticated_header = yes
smtpd_tls_cert_file = /etc/postfix/smtpd.cert
smtpd_tls_key_file = /etc/postfix/smtpd.key
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtpd_use_tls = yes
transport_maps = proxy:mysql:/etc/postfix/mysql-virtual_transports.cf
virtual_alias_domains =
virtual_alias_maps = proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf, mysql:/etc/postfix/mysql-virtual_email2email.cf
virtual_gid_maps = static:5000
virtual_mailbox_base = /home/vmail
virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql-virtual_domains.cf
virtual_mailbox_limit_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailbox_limit_maps.cf
virtual_mailbox_limit_override = yes
virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cf
virtual_maildir_extended = yes
virtual_maildir_limit_message = "The user you are trying to reach is over quota."
virtual_overquota_bounce = yes
virtual_uid_maps = static:5000
Mailog error:

Quote:
Oct 5 10:28:13 server1 postfix/smtp[3764]: 2D597B427A: to=<sales@example.com>, relay=none, delay=0.07, delays=0.02/0.04/0.01/0, dsn=5.4.6, status=bounced (mail for mail.example.com loops back to myself)
Reply With Quote
Sponsored Links
  #2  
Old 6th October 2009, 13:45
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,740 Times in 2,575 Posts
Default

mail.example.com is already in the mydestination line, so I don't know why you still see that error. Did you restart Postfix?
__________________
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 6th October 2009, 23:03
uni uni is offline
Junior Member
 
Join Date: Oct 2009
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Unhappy RE: Virtual Domains, Mail loops back to myself

Yes, I restarted Postfix many times . I've tried a lot of different things and then undone them when they didn't work. This is really strange. I can't get any further. Is there any Postfix diags I can run that would tell me what's going on?

Thanks,
UNi
Reply With Quote
  #4  
Old 9th October 2009, 00:43
uni uni is offline
Junior Member
 
Join Date: Oct 2009
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default RE: Virtual Domains, Mail loops back to myself SOLVED

For some reason this line in /etc/postfix/main.cf causes a mail loop for my system:

#transport_maps = proxy:mysql:/etc/postfix/mysql-virtual_transports.cf

I basically reinstalled Postfix, got things working, then worked backwards to find the culprit.

-UNi

Also, as someone else mentioned, SpamAssassin is not enabled by default in the tutorial.
pico etc/default/spamassassin
** Move it to ON, 1

Last edited by uni; 9th October 2009 at 06:01.
Reply With Quote
  #5  
Old 9th May 2010, 07:18
cpress cpress is offline
Junior Member
 
Join Date: Jun 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

After days of searching around trying to figure out what was going on (i had the same issue), I finally came across this.

It actually has to do with the transport table itself. You do not need to populate this table. Keep it empty on a fresh install. It only applies if you are sending the message elsewhere to have it delivered.
Reply With Quote
  #6  
Old 19th May 2010, 20:40
kramse kramse is offline
Junior Member
 
Join Date: May 2010
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Nice this one helped me too.
I followed this guide when I ran into the same problem: http://www.howtoforge.com/virtual-us...il-ubuntu-9.10

When disabling the line:
#transport_maps = proxy:mysql:/etc/postfix/mysql-virtual_transports.cf

What am I actually disabling? the feature of having more than one domain?
Reply With Quote
  #7  
Old 19th May 2010, 21:08
kramse kramse is offline
Junior Member
 
Join Date: May 2010
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
 
Default

Quote:
Originally Posted by cpress View Post
It actually has to do with the transport table itself. You do not need to populate this table. Keep it empty on a fresh install. It only applies if you are sending the message elsewhere to have it delivered.
I enabled the line again, and emptied the transport table instead. Does this confllict in anyway with the line in main.cf:
relayhost = <here I have my isp smtp>
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
Postfix Timeout after DATA from some emails treeman Server Operation 13 25th September 2013 12:51
Undelivered Mail Returned to Sender Error202 General 5 7th May 2009 11:14
localhost postfix/master: fatal: bind 127.0.0.1 port 125: Permission denied g18c Installation/Configuration 4 24th March 2009 17:39
Help configure Postfix to use alt port 465 or 587 BoloMarkIII Installation/Configuration 10 16th March 2009 17:57
just the last step...and it works. Postfix...need help config. ubuntusr Installation/Configuration 1 5th January 2009 09:50


All times are GMT +2. The time now is 22:34.


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