Content:
sendmail -d0.4 -bv root
should tell you its version and some basic settings.
telnet localhost 25
sendmail should greet you with its welcome message and
tell you the version of its binary and config file.
Enter
QUIT
to leave this mode.
username is the user's login name. This field con-
tains no uppercase characters, and must not
be more than eight characters in length.
If you really need it, set the flag 'u' in
Mlocal,..F=..u..
^
in
sendmail.cf
u Upper case should be preserved in user names for
this mailer.
If you use procmail as local mailer, make sure you define NO_USER_TO_LOWERCASE_HACK (in config.h?).
sendmail -bt > 3,0 nameresolve to the local mailer?
553 relay.domain.net config error: mail loops back to myself 554 <user@domain.net>... Local configuration errorand both hints didn't solve your problem?
So here is another hint what might be wrong: You use a
LOCAL_RULE_0in your sendmail.mc (which is S98 in sendmail.cf)? This rule is evaluated before the local recognition of S0 happens. So if you use some rule here, which (by accident) also matches your local host but doesn't resolve to local, you have a problem. Try to debug that address and see where it fails (where it gets resolved to another mailer than local).
R$+ < @ the.domain. > $#local $: the-user all to one userThis usually goes into ruleset 0.
If you want to route all mail to unknown users to one account (instead of giving the standard error reply), you can put in your .mc file the following:
define(`LUSER_RELAY',`local:someuser@your.domain')or in some cases:
define(`LUSER_RELAY',`local:someuser')Another method which isn't recommended (and only works with sendmail 8.0): look in your sendmail.cf for these lines and remove the hash in front of them:
Kuser user -m -a<> DLlocal:someuser@your.domain R< > $+ $: < $L . > $( user $1 $) look up user R< $* > $+ <> $* $: < > $2 $3 found; strip $L R< $* . > $+ $: < $1 > $2 strip extra dotSomething similar can be accomplished for virtual domains.
client.domain. IN MX 10 mailserver.client.domain. client.domain. IN MX 20 mailserver.my.domain. mailserver.client.domain. IN MX 10 mailserver.client.domain. mailserver.client.domain. IN MX 20 mailserver.my.domain.The last two records are there "just in case".
Instead of using MX records that point to mailserver.client.domain, you can use the FEATURE(mailertable) on mailserver.my.domain as explained in cf/README for routing e-mails.
##################################### ### MYSMTP Mailer specification ### ##################################### VERSIONID(`@(#)mysmtp.m4 0.1 (ca) 1998-09-26') Mmysmtp, P=[IPC], F=CONCAT(mDFMuX8, SMTP_MAILER_FLAGS), S=mysmtp, R=ifdef(`_ALL_MASQUERADE_', `21/31', `21'), E=\r\n, L=990, _OPTINS(`SMTP_MAILER_MAX', `M=', `, ')_OPTINS(`SMTP_MAILER_CHARSET', `C=', `, ')T=DNS/RFC822/SMTP, A=SMTP_MAILER_ARGSand add something like this:
MAILER(mymailer)dnl LOCAL_RULE_0 Rfriend<@some.domain.>$* $#mysmtp $@ some.domain. $: friend<@some.domain.>$1 LOCAL_RULESETS # # sender rewriting for mysmtp # Smysmtp R$+ $: $>51 $1 sender/recipient common R$* :; <@> $@ list:; special case R$* $: $>61 $1 qualify unqual'ed names R$* < @ *LOCAL* > $* $: $1 < @ Domain.For.Friend . > $2 use full name(or whatever rewriting you need/want) to your .mc file (if you need this for more than one address, use a class for the match).