Rob van der Putten wrote:
> Package: mailto
> Version: 1.2.6
> Version: 1.3.2
> 
> 
> Hi there
> 
> 
> Mailto uses gethostbyname() to get the hostname;
> 
>         /* Get the local hostname for later insertion */
>         gethostname(localhost, sizeof(localhost));
>         if ( index(localhost, '.')) {
>                 snprintf(hostname, sizeof(hostname), "%s", localhost);
>         } else {
>                 hent = gethostbyname(localhost);
>                 if ( hent )
>                         snprintf(hostname, sizeof(hostname), "%s", 
>                         hent->h_name);
>                 else
>                         snprintf(hostname, sizeof(hostname), "%s", 
>                         localhost);
>         }
> 
> This OK as long as you don't add www-data to the trusted users in your 
> SMTPD conf. Otherwise you may get an invalid sender address which may be 
> blocked by spam filters.

Please be more verbose.

Why should gethostname() not return the valid hostname of the host
it runs on?

If it doesn't return something useful, I'd expect /etc/hostname and
thus the hostname setting to be bogus and correction-requiring.

On Debian installations, the name in /etc/hostname and /etc/mailname and
/etc/hosts should be consistent.  If this isn't the case, the local
admin has botched it, I'd say until proven otherwise.

Regards,

        Joey

-- 
Experience is something you don't get until just after you need it.

Please always Cc to me when replying to me on the lists.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to