Hello,
It might be me, but the problem I encountered seems very illogic to me,
maybe any of you can help me out, I suspect the sendmail behaves more
differently than it should when given the -t parameter:
I have 2 text files containing an email. One of the files has a To
address without a domain, and one with a domain, like this:
testmail.domainless.txt:
Subject: Test without domain
To: Sir Quinox <quinox>
Body for the test without domain
testmail.withdomain.txt :
Subject: Test with domain
To: Sir QuinoX <[EMAIL PROTECTED]>
Body of the test with domain
Now, if I feed those files to sendmail without any parameters:
[EMAIL PROTECTED] ~ $ sendmail < testmail.domainless.txt ; echo $?
empty recipient list
2
[EMAIL PROTECTED] ~ $ sendmail < testmail.withdomain.txt ; echo $?
empty recipient list
2
Thats a normal respons. Now, if I feed it with the -t parameter (
Extract recipients from the 'To:'/'Cc:'/'Bcc:' header tags. ), I get this:
[EMAIL PROTECTED] ~ $ sendmail -t < testmail.domainless.txt ; echo $?
empty recipient list
7
[EMAIL PROTECTED] ~ $ sendmail -t < testmail.withdomain.txt ; echo $?
0
So it refuses to accept the domainless email, and it accepts the mail
with a domain. Now, if I specify the recipients on the command line:
[EMAIL PROTECTED] ~ $ sendmail quinox < testmail.domainless.txt ; echo $?
0
[EMAIL PROTECTED] ~ $ sendmail [EMAIL PROTECTED] < testmail.withdomain.txt ;
echo $?
0
Then it accepts both styles ! (the input file doesn't really matter
here) Very odd if you ask me - DEFAULT_DOMAIN var is exported in
/usr/bin/sendmail:
#!/bin/sh
if [ -z $MAIL_ROOT ]; then
export MAIL_ROOT=/var/MailRoot
fi
if [ -z $DEFAULT_DOMAIN ]; then
export DEFAULT_DOMAIN="qtea.nl"
fi
/usr/sbin/sendmail.xmail $*
Is the DEFAULT_DOMAIN only being used when the recipients are specified
on the command line, and is this by design ?
Ceesjan Luiten
-
To unsubscribe from this list: send the line "unsubscribe xmail" in
the body of a message to [EMAIL PROTECTED]
For general help: send the line "help" in the body of a message to
[EMAIL PROTECTED]