Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

System name in SMTP messages and virtual hosting.

11 views
Skip to first unread message

D. Stussy

unread,
Nov 2, 2009, 4:01:00 PM11/2/09
to
I have noted how to (and do) change the name in my initial greeting banner,
replacing $j by ${if_name} (confSMTP_LOGIN_MSG). However, after the HELO
line is received and processed, sendmail replies with what it thinks is its
hostname (250 -MyHostName- hello -CurSmtpClient-, pleased to meet you).
Is the variable "MyHostName" set by $j? Can it be changed during M4 call
"check_relay"? Using ${if_name}(or ${if_ptr}) instead of $j is common for
virtual hosting (where each VH listens on a separate IP address and
sendmail binds to the default [0.0.0.0] or [::]), but having the second
response reply with a different hostname breaks the continuity of the
virtual host (unless the incoming connection is to the main hostname).

It doesn't appear as if this is possible in an unmodified Sendmail 8.14.3.

In sendmail/srvrsmtp.c, subroutine smtp(), it appears that an envelope
variable already exists (as it is passed in as "e"), so replacing
"MyHostName" with a reference to the "$j" macro seems possible. Setting
"$j" to "${if_name}" in the check_relay ruleset is possible with a storage
map directive. Does anyone see a reason why this won't work?


0 new messages