Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have a mail server for a "one man" company with two virtual domains.
This provides mail services for the owner in two roles, one as a self-employed consultant (domain1), and the other as a director of another company (domain2).
Domain2 has its own mail server, so all we need to do is fetch the mail from there and keep a local copy which the owner/director can access remotely via IMAP (dovecot) and/or SquirrelMail.
The problem I have is that he is unable to send mail to his colleagues at domain2, because postfix tries to deliver it to the local virtual domain instead of to the remote domain2 mail server.
Typical log entry looks like this:
May 19 14:15:14 mail postfix/smtpd[11632]: NOQUEUE: reject: RCPT from unknown[x.x.x.x]: 550 5.1.1 <anyone@domain2>: Recipient address rejected: User unknown in virtual mailbox table; from=<director@domain2> to=<anyone@domain2> proto=ESMTP helo=<xxxxx>
The transport file looks like this:
director@domain2 virtual:
domain2 smtp:[mail.domain2]
domain1 virtual:
local test (sendmail -bv anyone@domain2) works fine and the message is relayed, but when the owner sends an email from his laptop it gets the error message above. How can I configure postfix for this to work properly?
re previous last paragraph...
I have followed the recommended local test/debugging process to send a test message from the mail server using "sendmail -bv name@domain2". This attempts to send a probe message and reports via an email to the originator (in this case root@localost) with a status report. The report shows that the relay (transport method) was correct and the message was deliverable.
The boss uses his laptop(s) to access his mail server remotely. Mostly he uses Outlook, but he also has an Apple Mac with mac mail. When he sends a message (or replies to one from his colleagues in domain2) his mail client initiates an smtp session with his mail server, usually from an "unknown" address. It is this session that generates the problem.
grep 11387 /var/log/mail.log ...
May 19 14:07:52 mail postfix/smtpd[11387]: connect from unknown[41.252.49.158]
May 19 14:07:57 mail postfix/smtpd[11387]: BD00E466395: client=unknown[41.252.49.158], sasl_method=LOGIN, sasl_username=director@domain2
May 19 14:08:02 mail postfix/smtpd[11387]: NOQUEUE: reject: RCPT from unknown[41.252.49.158]: 550 5.1.1 <name@domain2>: Recipient address rejected: User unknown in virtual mailbox table; from=<director@domain2> to=<name@domain2> proto=ESMTP helo=<xxxx>
May 19 14:08:06 mail postfix/smtpd[11387]: disconnect from unknown[41.252.49.158]
Can you post the reports from the sendmail -bv test.
Are you sure your transport syntax is correct? We can't see that if you replace actual domains with domain2, etc.
Sorry, don't feel free to give the actual address details. I've left the .co.uk parts in to make it look more real.
content of email report:
Code:
This is the mail system at host localhost.
Enclosed is the mail delivery report that you requested.
The mail system
<name@domain2.co.uk>: delivery via
mail.domain2.co.uk[x.x.x.x]:25: 250 2.1.5 name@domain2.co.uk
Reporting-MTA: dns; localhost
X-Postfix-Queue-ID: 4B89646639D
X-Postfix-Sender: rfc822; root@domain1.co.uk
Arrival-Date: Wed, 20 May 2009 08:25:10 +0100 (BST)
Final-Recipient: rfc822; name@domain2.co.uk
Action: deliverable
Status: 2.1.5
Remote-MTA: dns; mail.domain2.co.uk
Diagnostic-Code: smtp; 250 2.1.5 name@domain2.co.uk
Received: by localhost (Postfix, from userid 0)
id 4B89646639D; Wed, 20 May 2009 08:25:10 +0100 (BST)
From: root@domain1.co.uk
Subject: probe
To:
name@domain2.co.uk
Message-Id: <20090520072510.4B89646639D@localhost>
Date: Wed, 20 May 2009 08:25:10 +0100 (BST)
I don't understand why the transport file doesn't map when the boss is sending. Note the "delivery via" part of the above status report. This matches the transport file.
Not able to test that at the moment. He's abroad and I don't have access to the premises.
How does the authentication status affect the routing decisions?
What would happen if I removed the domain2 from the vhosts? Would postfix use the transport file to route the incoming mail for name@domain2.co.uk to the virtual folders? or would it just screw up the virtual delivery agent?
May 19 14:08:02 mail postfix/smtpd[11387]: NOQUEUE: reject: RCPT from unknown[41.252.49.158]: 550 5.1.1 <name@domain2>: Recipient address rejected: User unknown in virtual mailbox table; from=<director@domain2> to=<name@domain2> proto=ESMTP helo=<xxxx>
Since domain2 is in the virtual mailbox class, postfix will reject mail to recipients not listed in vmaps. The solution is either 1. to list all valid recipients in vmaps (this includes users on both the local machine and the remote domain2 MX), or 2. have a catchall entry in vmaps. The mailbox that you list is just a dummy, since transport_maps determines the final transport in the end.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.