Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Postfix + MySQL + fetchmail tweaks
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Cyberwizzard
Apprentice
Apprentice


Joined: 02 Apr 2004
Posts: 244
Location: Norway

PostPosted: Sat Jun 11, 2005 3:12 pm    Post subject: Postfix + MySQL + fetchmail tweaks Reply with quote

Hi everybody,

I've used the Vmail host guide to set up a virtual mail host:
http://www.gentoo.org/doc/en/virt-mail-howto.xml

This host is running for the same domain as the server - this is because I don't want local users to receive mail, only virtual users. This seems to work fine. However there are 2 little glitches that I need to get fixed.

First, when trying to deliver to Postfix with an invalid target address, Postfix accepts the mail and then immidiately bounces it. This has the disadvantage that spammers can drop the mail on my machine while it is bouncing and when a hoax return address is provided it'll bounce to that address. So how do I tell Postfix to refuse the mail the second it tries to specify an invalid target address?

And second, I've used a setup with Cyrus IMAP before switching to Courier. Now I've always used fetchmail to grab mail from 4 other POP3 accounts and deliver it to Cyrus which sorts it using Sieve in the correct folder. For some reason I can't find if Courier has a similar way to deliver fetched mail. I've tried using it as it is but then Postfix accepts the new fetched mail and then drops it into a local mailbox (one that should not be active in the first place as this system should use virtual users only). Is there a way to deliver it to Courier using IMAP? Or can I tell Postfix to accept the foreign address and drop it into a local account? Or is it possible to get fetchmail to deliver the mail to a certain account?
I've read something about using fetchmail directly to drop mail using one of couriers internal programs - however multiple sites warned me that its possible that fetchmail doesn't detect errors during delivery and simply removes the email from the remote host while it hasn't been stored locally.
Back to top
View user's profile Send private message
Cyberwizzard
Apprentice
Apprentice


Joined: 02 Apr 2004
Posts: 244
Location: Norway

PostPosted: Sat Jun 11, 2005 4:05 pm    Post subject: Reply with quote

[/code]I've tailed the postfix logs and none of the local checks match, I'm posting a dump from the last part at which I entered a "RCPT FROM bala@bla.com" and postfix gave me a thumbs up with a 250 code:
Code:
Jun 11 17:55:53 sportlaan postfix/smtpd[32328]: maps_find: virtual_alias_maps: bala@bla.com: not found
Jun 11 17:55:53 sportlaan postfix/smtpd[32328]: match_string: bla.com ~? sportlaan
Jun 11 17:55:53 sportlaan postfix/smtpd[32328]: match_string: bla.com ~? localhost.sportlaan.adsl.???????.nl
Jun 11 17:55:53 sportlaan postfix/smtpd[32328]: match_string: bla.com ~? localhost
Jun 11 17:55:53 sportlaan postfix/smtpd[32328]: match_list_match: bla.com: no match
Jun 11 17:55:53 sportlaan postfix/smtpd[32328]: dict_mysql_lookup using sql query: select destination from virtual where email = '@bla.com'
Jun 11 17:55:53 sportlaan postfix/smtpd[32328]: dict_mysql_get_active: found active connection to host unix:/var/run/mysqld/mysqld.sock
Jun 11 17:55:53 sportlaan postfix/smtpd[32328]: dict_mysql: successful query from host unix:/var/run/mysqld/mysqld.sock
Jun 11 17:55:53 sportlaan postfix/smtpd[32328]: dict_mysql_lookup: retrieved 0 rows
Jun 11 17:55:53 sportlaan postfix/smtpd[32328]: maps_find: virtual_alias_maps: @bla.com: not found
Jun 11 17:55:53 sportlaan postfix/smtpd[32328]: mail_addr_find: bala@bla.com -> (not found)
Jun 11 17:55:53 sportlaan postfix/smtpd[32328]: connect to subsystem public/cleanup
Jun 11 17:55:53 sportlaan postfix/smtpd[32328]: public/cleanup socket: wanted attribute: queue_id
Jun 11 17:55:53 sportlaan postfix/smtpd[32328]: input attribute name: queue_id
Jun 11 17:55:53 sportlaan postfix/smtpd[32328]: input attribute value: 37C61768B6
Jun 11 17:55:53 sportlaan postfix/smtpd[32328]: public/cleanup socket: wanted attribute: (list terminator)
Jun 11 17:55:53 sportlaan postfix/smtpd[32328]: input attribute name: (end)
Jun 11 17:55:53 sportlaan postfix/smtpd[32328]: send attr flags = 50
Jun 11 17:55:53 sportlaan postfix/smtpd[32328]: 37C61768B6: client=????.student.utwente.nl[130.89.160.???]
Jun 11 17:55:53 sportlaan postfix/smtpd[32328]: > ????.student.utwente.nl[130.89.160.??]: 250 Ok


This means that it doesn't get a match in the local table and nothing in the virtual MySQL tables and still it accepts the transmission.... I can't figure out why - a similar machine that I've set up using almost the same layout works flawlessly and rejects unknown addresses with a 554 or similar code....
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum