Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

The title pretty much sums in up. Local mail is working fine via LMTP, however non-local mail (virtual hosting) is struggling. I've provided as much information below as possible, trying to keep it relevant. I can't figure out what is going wrong here.

Things I've verified:

  • is in {VirtHost}
  • It is trying to deliver via my mailer, not local (though local is delivering to LMTP too, and is working perfectly). Verified via log and changing the LMTP socket for virtual mail only (see below).

Mailer specification:

Mdovecot, P=[IPC], F=SXmnz9,
    S=EnvFromSMTP/HdrFromL, R=EnvToSMTP/HdrToL, E=\r\n,
    A=FILE /var/run/dovecot/lmtp

SMTP conversation:

$ telnet localhost 25
Connected to localhost.
Escape character is '^]'.
220 ESMTP Sendmail; Mon, 31 Oct 2011 23:29:54 GMT
EHLO localhost
Subject: Hello world!

Hello there, everyone!
quit Hello localhost [], pleased to meet you
250 HELP
250 2.1.0 Sender ok
250 2.1.5 Recipient ok
354 Enter mail, end with "." on a line by itself
250 2.0.0 p9VNTswi016356 Message accepted for delivery
221 2.0.0 closing connection
Connection closed by foreign host.

Resulting LMTP conversation:

# socat -v UNIX-LISTEN:lmtp-socat UNIX-CLIENT:lmtp
< 220 Dovecot LMTP ready\r
> LHLO\r
< 250-8BITMIME\r
> MAIL From:<>\r
< 250 2.1.0 OK\r
> RCPT To:<>\r
> DATA\r
< 550 5.1.1 <> User doesn't exist: \r
< 554 5.5.1 No valid recipients\r
> RSET\r
< 250 2.0.0 OK\r
> QUIT\r
< 221 2.0.0 Client quit\r

Sendmail address translation (I think this is the way the internal processing works, someone correct me if not and I'll fix this):

$ sendmail -bt
ADDRESS TEST MODE (ruleset 3 NOT automatically invoked)
Enter <ruleset> <address>
> 0,3,EnvToSMTP
parse              input: mscharley @ example . com
Parse0             input: mscharley @ example . com
Parse0           returns: mscharley @ example . com
ParseLocal         input: mscharley @ example . com
ParseLocal       returns: mscharley @ example . com
Parse1             input: mscharley @ example . com
Parse1           returns: $# local $: mscharley @ example . com
parse            returns: $# local $: mscharley @ example . com
canonify           input: $# local $: mscharley @ example . com
canonify         returns: $# local $: mscharley @ example . com
EnvToSMTP          input: $# local $: mscharley @ example . com
EnvToSMTP        returns: $# local $: mscharley @ example . com
share|improve this question
your information is not consistent between the displays. Thus confusion! – mdpc Nov 1 '11 at 0:23
@mdpc Yes, I tried to sanitise a bit, but failed miserably. Oops. Should be consistent now though (though, see my answer). – Matthew Scharley Nov 1 '11 at 0:33
up vote 1 down vote accepted

Sometimes you just need to type everything out to straighten out your own mind.

This was caused by a blank domain in mailertable, ie:    dovecot:

Changing this to the following resolved the issue entirely:
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.