On 09/14/2017 07:44 PM, Joseph Brennan wrote:
> So, back to where we started. What will be in that generated Message-ID?

See mimedefang.pl:

sub gen_msgid_header {
        my ($ss, $mm, $hh, $mday, $mon, $year, $wday, $yday, $isdst) =
localtime(time);

        # Generate a "random" message ID that looks
        # similiar to sendmail's for SpamAssassin comparing
        # Received / MessageID QueueID
        return sprintf("Message-ID: <%04d%02d%02d%02d%02d.%s\@%s>\n",
                $year + 1900,
                $mon  + 1,
                $mday,
                $hh,
                $mm,
                ($QueueID eq 'NOQUEUE' ? rand() : $QueueID),
                get_host_name()
        );
}

> Would my mail host's name, the one that received the message, be in it?

Yes:

sub get_host_name {
    # Use cached value if we have it
    return $PrivateMyHostName if defined($PrivateMyHostName);

    # Otherwise execute "hostname"
    $PrivateMyHostName = hostname;

    $PrivateMyHostName = "localhost" unless defined($PrivateMyHostName);

    # Now make it FQDN
    my($fqdn) = gethostbyname($PrivateMyHostName);
    $PrivateMyHostName = $fqdn if (defined $fqdn) and length($fqdn) >
length($PrivateMyHostName);

    return $PrivateMyHostName;
}

-- 
Richard
_______________________________________________
NOTE: If there is a disclaimer or other legal boilerplate in the above
message, it is NULL AND VOID.  You may ignore it.

Visit http://www.mimedefang.org and http://www.roaringpenguin.com
MIMEDefang mailing list MIMEDefang@lists.roaringpenguin.com
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang

Reply via email to