stew has asked for the wisdom of the Perl Monks concerning the following question:

Hi,

I have a few mailer scripts that I run from the command line. Each script handles newsletters for different domains. It occured to me that the hostname of the machine would be the same for each mail-out and would appear in the header of the message. This then led me to think that returned messages that came back with connection refused may have something to do with the fact that the hostname in the header doesn't match were the message originated and was being rejected by a spam filter.

To get round this I tried hostname origindomainname.net

I have two questions...

1) Am I deluded in thinking that setting the hosname will reduce the amount of rejected mail.

2) If not is it possible to do this in a script (without privalages) - as I would like to automate the sending of bulletins

Regards

Stew

Replies are listed 'Best First'.
Re: shell - hostname
by KPeter0314 (Deacon) on May 28, 2003 at 15:08 UTC
    1) Yes, a little.

    2) Ummm... is that a question?

    It looks like it is refusing from a DNS standpoint. Changing your hostname won't change what the DNS says.

    SPAM filters do all sorts of checking to make sure the email is valid. One of those checks is a reverse lookup on your IP. If that doesn't match the domain name then you can have problems.

    My guess (from reading between the lines) is that you are trying to rewrite the headers in a way that the SPAM filter flags as spam. If you are going to send mail like this you will need to know a little more about how email works.

    -Kurt

Re: shell - hostname
by stew (Scribe) on May 28, 2003 at 15:26 UTC
    Thanks for the reply,

    I've just had this task dumped on me so I'm sort of feeling my way around, but trying to get the info quickly.

    Thinking about it what you say about the DNS makes total sense, and a reverse look up would get a true match - I'm not trying to do anything dodgy here.

    Cheers

    Stew