Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Running two instances of Postfix...

Status
Not open for further replies.

hcyuan

IS-IT--Management
Sep 9, 2005
25
US
I have a SuSE 9.0 Professional system that was running 2 instances of Postfix (version 2.0.14 or something, two different directories, one was Postfix and other was Postfix.in). It was also running MailScanner. The way it worked was:

1. Postfix.in receives email and defers the email to the deferred queue.
2. MailScanner checks for mail in the Postfix.in\defer directory. If it finds any, it scans it for spam and viruses, then moves it to the Postfix\incoming directory.
3. Postfix doesn't listen for SMTP connections. It just takes anything from the its incoming directory (postfix\incoming) and then sends it out to our real mail server.

It was working...but not as efficiently as we get people trying to send emails to 1@domain.com, 2@domain.com, etc. None existing addresses. So, it'll still go through and process everything.

So, I learned that the new Postfix (starting from version 2.1 and up), has a reject_unverified_recipient that I could use to have Postfix check my mail server to make sure it's a valid recipient before it sends out the email. I figured that if I updated the Postfix.in side, it should be everything I need to just drop those emails.

So, I downloaded the RPM for Postfix 2.2.6 and I renamed Postfix to Postfix.out. Renamed Postfix.in to Postfix. As I only wanted to update the inbound side. Then I ran the RPM install, which upgraded it. I then renamed it back to the way it was, Postfix to Postfix.in, Postfix.out to Postfix. I tried running it again and Postfix.in won't load because it couldn't find some dynamic mappings or something. I figured it was related to the fact that Postfix is still the old version, so it was missing the new features. So, I renamed Postfix to Postfix.out, then copied Postfix.in to Postfix. So that way, they're both 2.2.6.

I then went through the Postfix\main.cf and master.cf and compared it to Postfix.out\main.cf and master.cf, line by line to make the necessary configuration changes so that it works as the outbound portion.

After I made all the changes, I started both modules up plus MailScanner. Postfix.in does its job of receiving mail and putting it into the deferred directory. MailScanner does its job of scanning and checking for viruses then putting it into the incoming directory. However, Postfix doesn't do it's job...sending it out.

Here's the weird part. If I stop and start Postfix (while Postfix.in and MailScanner is running), it'll detect everything in it's incoming directory and send them out. After that, it doesn't do anything anymore. Postfix.in will keep doing it's job. I would need to stop and start Postfix again for it to send out the next batch.

Anybody know what may be causing this? Any help is greatly appreciated. Thank you.

Howard
 
Okay, I got the problem fixed.

Problem was because Postfix changed their queues from hash to non-hash. MailScanner was still using the old Postfix method of putting the emails in hash format to the incoming directory. So, I told Postfix (the outbound one) to use hash for the incoming queue by adding the following line to main.cf:

hash_queue_names = incoming

That took care of it. All thanx to Viktor Duchovni for helping me figure this out. :)
 
Hi Howard,

I'm trying to run two instances of Postfix (2.2.5) on SuSE 9.3 & SuSE 10.0.

If I start Postfix manually (postfix -c /etc/postfix && postfix -c /etc/postfi2) it works good, I've modified the SuSE's startup script but is not working yet.

Can you tyell me how are you starting the processes?

Thanks!

Raul
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top