Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
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?
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).
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?
>>>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.
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.