LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 08-07-2008, 05:16 AM   #1
@ngkor
LQ Newbie
 
Registered: Aug 2008
Location: Siem Reap Angkor, CAMBODIA
Distribution: Ubuntu 8.04
Posts: 5

Rep: Reputation: 0
Need help! I am moving from MDaemon to Postfix


Hi everyone,

I'm new to Postfix, I plan to run Postfix on Ubuntu Server 8.04 for my branch office. Below are what we have, what we need and problem we face.


Here what we currently have:
===========================
My Head Office running Exim 4 as MTA, so all users have to connect to head office to receive their email.

At my branch office we use MDaemon to handle local email and download email from Head Office mail server for our local users. Every user at my branch office has their email account on both MDaemon and Exim (the same email account), I config MDaemon to download email every 15mn from Exim for each user account by using MultiPOP. So our local users send and receive their email via MDaemon.


And here what we need:
======================
I would like to replace MDaemon with Postfix for my branch office, and now I am facing a problem when my local user in branch office try to send email to head office user. Postfix will reject the email with "Unknown Virtual User". I use virtual mailbox domain because my user don't need any linux account.

This problem can be handle by MDaemon with the "Unknown Mail" option, mean MDaemon will forward unknown email address to any other SMTP server (yes, I set it to my head office mail server).

Anyone please advice me how can I configure Postfix to forward Unknown email address to another SMTP server?

Thanks
 
Old 08-08-2008, 12:31 AM   #2
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 59
I don't think you want a virtual user or virtual mailbox setup. Instead, you want to configure Postfix to relay mail for your domain to your head office. Configure Postfix with the list of valid recipients to avoid spam sent to invalid recipients (which is the most common spam attack).
 
Old 08-08-2008, 03:27 AM   #3
@ngkor
LQ Newbie
 
Registered: Aug 2008
Location: Siem Reap Angkor, CAMBODIA
Distribution: Ubuntu 8.04
Posts: 5

Original Poster
Rep: Reputation: 0
Thanks Mr. C,
Is it possible to use virtual mailbox domain to do this?
Which parameter could be use to relay unknown virtual email to another SMTP?

Thanks
 
Old 08-08-2008, 11:21 AM   #4
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 59
Review the Postfix addresses classes in general, but here is what a virtual mailbox is:

http://www.postfix.org/ADDRESS_CLASS..._mailbox_class

Users in the virtual mailbox class will have their mail delivered directly to your server.

You said the problem you were facing was "local user in branch office try[ing] to send email to head office user.". Do all your corporate users have the same domain name in their email address? (ex. example.com)? Where is the primary mailbox for either head or branch office. It sounds like in your description mailboxes lived at the head office, and you just retrieved mail from there. And you sent outbound mail *through* the head office. If this is correct, you have no direct delivery mailboxes, but instead only have mailboxes which are populated by POP.

Is this a private network, or is your head office mail server an MX for all mail delivery for your domain?
 
Old 08-08-2008, 10:38 PM   #5
@ngkor
LQ Newbie
 
Registered: Aug 2008
Location: Siem Reap Angkor, CAMBODIA
Distribution: Ubuntu 8.04
Posts: 5

Original Poster
Rep: Reputation: 0
Hi Mr. C,

Thanks again for your help!

>>>Do all your corporate users have the same domain name in their email
>>>address? (ex. example.com)?

Yes all our users (head office and branch office) have the same domain name in their email address.


>>>Where is the primary mailbox for either head or branch office.
>>>It sounds like in your description mailboxes lived at the head office,
>>>and you just retrieved mail from there.

Yes you are right. mail server in my branch office is not a real internet hostname, so we can not receive email directly. MX point to my head office mail server that receive all email for my domain.


>>>And you sent outbound mail *through* the head office.

Not exactly yes, Because I have about 70 users at my branch office and over 150 users at Head Office and mostly my users at branch office send email within the office and to customers. So internal email server at my branch office save us a lot of bandwidth.

I set Postfix relayhost = my ISP's SMTP server, so all outbound email send out via my ISP's SMTP server.


>>>If this is correct, you have no direct delivery mailboxes,
>>>but instead only have mailboxes which are populated by POP.

Suppose a customer send me an email (I am at branch office), that email will go to my email box at head office mail server. Then my branch office mail server will download (POP every 15mn) all emails in my mailbox at head office server, and store that email in my mailbox in my mail server at branch office. Finally I use email client to read and reply that email.

Note: Every users at branch office has two email accounts, one on branch office server and another on head office server (both account are the same), and we use the same method to get/send email.


The only problem is that, when I send email to my head office user (the same domain name) Postfix check the recipient email address and reject my email with "Unknown Virtual User".

Is there any parameter in Postfix that can relay/forward those unknown recipient mail to another SMTP server?
Or I am appreciated if you can suggest any better solution for my branch office.

Thanks and Regards,
LONG
 
Old 08-08-2008, 11:54 PM   #6
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 59
You really don't want to forward mail for unknown users - this will be an endless source of spam and eventually backscatter.

The typical solution to your problem is to use branch-specific subdomains, such as:

example.com # head office, company MX
branchoffice.example.com # branch office

and allow your head office to be the MX for the company. This would allow the head office MX to relay any branch office mail directly to your Postfix server. This would allow you to get rid of the 15-minute POP server downloads, as mail is relayed to the branch office immediately.

Your branch office server would accept mail for the branchoffice.example.com domain.

Obviously, this requires coordination with the head office, as they a) need a list of valid recipients in branchoffice.example.com, and b) need to know to relay to the branch office server. This could be done either by internal MX RR or by something like a transport map.

Setup your postfix server with virtual mailboxes for the domain branchoffice.example.com, and populate a virtual mailbox map for all your branch office employees. For inter-office mail, create a transport map which sends mail destined for the head office to send directly to the head office MX, avoiding your ISP. And of course intra-branch mail will go directly to the branchoffice.example.com virtual mailboxes that your server manages.
 
Old 08-09-2008, 02:53 AM   #7
@ngkor
LQ Newbie
 
Registered: Aug 2008
Location: Siem Reap Angkor, CAMBODIA
Distribution: Ubuntu 8.04
Posts: 5

Original Poster
Rep: Reputation: 0
Hi Mr. C,

Actually we have many branch offices and our management preferred the same domain name for all office since the beginning, because it would not confuse our customers and we are only one group.

We are using MDaemon at each branch office, it work fine. It relay unknown recipient email to our Head Office SMTP server.

The reason I want to change to Postfix because I want to use Squid as Proxy Server and I love the stability and security of Linux Operating System.

Is there any trick to make Postfix relay email for unknown recipient to other SMTP server? Same as what MDaemon did.

I read about Exim 4, it is very flexible and come with full features. Did Exim 4 could solve my problem?

Thanks,
LONG
 
Old 08-09-2008, 05:42 PM   #8
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 59
Here is a thread where the same topic is discussed.

http://tech.groups.yahoo.com/group/p...ap=1&var=1&l=1
 
Old 08-10-2008, 08:27 PM   #9
@ngkor
LQ Newbie
 
Registered: Aug 2008
Location: Siem Reap Angkor, CAMBODIA
Distribution: Ubuntu 8.04
Posts: 5

Original Poster
Rep: Reputation: 0
Thanks you so much Mr. C for the link.

Thanks,
LONG
 
  


Reply

Tags
postfix, ubuntu


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Alternative for MDAEMON for linux ALInux Linux - Software 3 02-19-2010 01:35 AM
Moving from sendmail on redhat to postfix on debian.. thejonmoore Linux - Server 4 04-17-2008 12:32 PM
mdaemon problem tariq07 Linux - Networking 0 05-16-2007 12:32 AM
Moving server - Mail Accounts - Postfix ]SK[ Linux - Software 1 03-26-2005 10:28 AM
Moving a working Cyrus IMAP/Postfix setup rnturn Linux - Software 0 03-24-2004 09:48 PM


All times are GMT -5. The time now is 06:44 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration