Hi Folks,
I am having trouble sending mail to other users on my PC.
I used to me able to type "mail tux" at the shell prompt and create a mail which was delivered to user "tux" on my local PC but can no longer do this.
Now if I try and send mail to local user "tux" then something on my system is incorrectly expanding the "To" address to tux@uk2.net (uk2 is my ISP) and sending it to my ISPs SMTP server, rather than simply putting it in tux's local inbox. My message to my local user therefore gets bounced back by UK2 as undeliverable (i.e mail to local users is now being treated as mail for remote users and leaves my PC rather than remaining on it and being instantly put in their local mailbox).
If I try and send mail to my local user "tux" by quoting the full name of the local PC after his username: tux@bobbin.haberdashery.willowwindmill.net it again leaves my PC and is sent to my ISPs SMTP mailserver and is bounced back as undeliverable.
I have copied the full text of the error messages I am getting onto the following webpage rather than appending them to this message: www.k1ngph1cher.uklinux.net/bobbinmailerrors.htm
I guess I must have misconfigured something but am unsure what and don't know which files I need to edit to correct this. What do I need to tweak so that mail for local users is routed locally within my PC instead of being sent externally via my ISP?
In case it is relevant the particular PC concerned (bobbin.haberdashery.willowwindmill.net) is running Slackware 10.0
Second question: Because of my mail delivery tests I now appear to have several test mail messages stuck in a mail queue somewhere on my PC. How do I delete all these duff messages from the mail queue so I can start sending valid emails again?
Ta muchly!
Ian.
On Fri, 2004-07-16 at 06:53, Ian Douglas wrote:
Now if I try and send mail to local user "tux" then something on my system is incorrectly expanding the "To" address to tux@uk2.net (uk2 is my ISP) and sending it to my ISPs SMTP server, rather than simply putting it in tux's local inbox.
That something is either your mua or your mta; probably the latter. Check your mta logs for clues. Put your mta logs and config files(s) on your web server.
If I try and send mail to my local user "tux" by quoting the full name of the local PC after his username: tux@bobbin.haberdashery.willowwindmill.net it again leaves my PC and is sent to my ISPs SMTP mailserver and is bounced back as undeliverable.
bobbin.haberdashery.willowwindmill.net has neither MX nor A record in the public dns, that's probably why you get "unrouteable address".
What do I need to tweak so that mail for local users is routed locally within my PC instead of being sent externally via my ISP?
It depends on your mta.
Second question: Because of my mail delivery tests I now appear to have several test mail messages stuck in a mail queue somewhere on my PC. How do I delete all these duff messages from the mail queue so I can start sending valid emails again?
They'll eventually bounce and be removed (usually in a week or so). If you want to remove them manually, ceck your mta documentation.
-- Martijn
On Friday, July 16, 2004 9:43 AM, Martijn Koster wrote:
Put your mta logs and config files(s) on your web server.
Thanks for your help Martijn...
I have uploaded /etc/mail/sendmail.cf as: http://www.k1ngph1cher.uklinux.net/sendmail_cf.htm
and /var/log/maillog as: http://www.k1ngph1cher.uklinux.net/maillog.htm
Ian.
On Fri, 2004-07-16 at 10:38, Ian Douglas wrote:
I have uploaded /etc/mail/sendmail.cf as: http://www.k1ngph1cher.uklinux.net/sendmail_cf.htm
Sendmail huh? Then I'll probably have to bow out -- I (purposefully) have little experience with configuring that. Perhaps someone else can be of more assistence.
But having looked at the file, it looks like it references /etc/mail/local-host-names Do you have to put bobbin.haberdashery.willowwindmill.net in there?
and /var/log/maillog as: http://www.k1ngph1cher.uklinux.net/maillog.htm
There I see things like:
Jul 14 09:39:17 bobbin sendmail[1476]: i6E8dHDf001476: to=tux, ctladdr=tux (4001/100), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30277, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (i6E8dHHN001477 Message accepted for delivery) Jul 14 09:39:18 bobbin sm-mta[1478]: i6E8dHHN001477: to=<tux@bobbin.haberdashery.willowwindmill.n
which suggests it is indeed your mta that's doing the tux address expansion you were wondering about.
-- Martijn
On Friday 16 July 2004 10:01, Martijn Koster wrote:
But having looked at the file, it looks like it references /etc/mail/local-host-names. Do you have to put bobbin.haberdashery.willowwindmill.net in there?
and...
On Friday 16 July 2004 10:32, MJ Ray wrote:
The problem may be in /etc/mail/local-host-names and /etc/hosts. Basically, the real name of your system probably needs to be in both local-host-names and hosts, and match.
Well spotted guys! I had a typo in the hostname in /etc/mail/local-host-names! The mailserver is now routing mail correctly.
Thanks.
Ian.
On 2004-07-16 10:38:49 +0100 Ian Douglas alug@k1ngph1cher.com wrote:
I have uploaded /etc/mail/sendmail.cf as: http://www.k1ngph1cher.uklinux.net/sendmail_cf.htm
The m4 file that generated the cf may be more useful.
The problem may be in /etc/mail/local-host-names and /etc/hosts. Basically, the real name of your system probably needs to be in both local-host-names and hosts, and match. It shouldn't be a real hostname out on the internet if you don't have one.
Getting this right is a bit like maki^H^H^H^H putting carpet down. There's many ways to do it, but if you get it wrong, you keep pushing one edge down only to have another spring up.