f



using genericstable, but it seems to be ignored

I have sendmail.mc set to masquerade newsguy.com.  So my mail goes out
with envelope from set to harry@newsguy.com (harry being my uid on
host).

However I want to make that outgoing mail have reader@newsguy.com in
both the regular From: line, and envelope from.

It appear that `genericstable' and `genericsdomain' can do that as
presented in http://www.tldp.org/HOWTO/Sendmail-Address-Rewrite-3.html
Documentation.

I've created genericstable and makemap hash'ed it
created genericdomain as directed by above cited url.
  (hostname -f d0.local.lan)
  hostname -f > genericsdomain

But then seeing as how the problem is my mail From: and envelope from
are appearing as `harry@newsguy.com... I also put: newsguy.com into
genericsdomain.

However the mail still leaves my host with harry@newsguy.com in both
`From:' and envelope from.

It seems the generics files are being ignored.

Pertinent file contens below (genericstable, genericsdomain,
sendmail.mc)

cat genericsdomain:

  d0.local.lan
  newsguy.com

cat gemericstable:

  harry                 reader@newsguy.com
  root                  reader@newsguy.com
  harry@newsguy.com     reader@newsguy.com

(makemap -r hash genericstable.db <genericstable)

 /etc/init.d/sendmail reload

created sendmail.cf with
cd sendmail-8.16.0.19/cf/cf
   make install-cf

using the sendmail.mc below (stripped for mail)
-------       -------       ---=---       -------       -------
root # grep -v '^\(dnl\|#\)' sendmail.mc 
-------       -------       ---=---       -------       ------- 
divert(-1)dnl
divert(0)dnl
define(`_USE_ETC_MAIL_')dnl
include(`/usr/share/sendmail/cf/m4/cf.m4')dnl
VERSIONID(`$Id: sendmail.mc, v 8.14.4-8+deb8u1 2016-06-30 18:08:19 cowboy Exp $')
OSTYPE(`debian')dnl
DOMAIN(`debian-mta')dnl
undefine(`confHOST_STATUS_DIRECTORY')dnl        #DAEMON_HOSTSTATS=
FEATURE(`no_default_msa')dnl
DAEMON_OPTIONS(`Family=inet,  Name=MTA-v4, Port=smtp, Addr=127.0.0.1')dnl
DAEMON_OPTIONS(`Family=inet,  Name=MSP-v4, Port=submission, M=Ea, Addr=127.0.0.1')dnl
define(`confPRIVACY_FLAGS',dnl
`needmailhelo,needexpnhelo,needvrfyhelo,restrictqrun,restrictexpand,nobodyreturn,authwarnings')dnl
define(`confCONNECTION_RATE_THROTTLE', `15')dnl
define(`confCONNECTION_RATE_WINDOW_SIZE',`10m')dnl
FEATURE(`use_cw_file')dnl
FEATURE(`access_db', , `skip')dnl
FEATURE(`greet_pause', `1000')dnl 1 seconds
FEATURE(`delay_checks', `friend', `n')dnl
define(`confBAD_RCPT_THROTTLE',`3')dnl
FEATURE(`conncontrol', `nodelay', `terminate')dnl
FEATURE(`ratecontrol', `nodelay', `terminate')dnl
include(`/etc/mail/m4/dialup.m4')dnl
include(`/etc/mail/m4/provider.m4')dnl
FEATURE(`always_add_domain')dnl
MASQUERADE_AS(`newsguy.com')dnl
FEATURE(`allmasquerade')dnl
FEATURE(`masquerade_envelope')dnl
FEATURE(genericstable, `hash -o /etc/mail/genericstable') dnl
GENERICS_DOMAIN_FILE(`/etc/mail/genericsdomain')dnl
MAILER_DEFINITIONS
define(`SMART_HOST',`[smtp.newsguy.com]')dnl
define(`RELAY_MAILER_ARGS', `TCP $h 587')dnl
define(`ESMTP_MAILER_ARGS', `TCP $h 587')dnl
MAILER(`local')dnl
MAILER(procmail)
MAILER(`smtp')dnl
0
Harry
12/13/2016 12:10:03 PM
comp.mail.sendmail 13518 articles. 1 followers. jfretby (35) is leader. Post Follow

3 Replies
81 Views

Similar Articles

[PageSpeed] 31

Harry Putnam  wrote:
> I have sendmail.mc set to masquerade newsguy.com.  So my mail goes out
> with envelope from set to harry@newsguy.com (harry being my uid on
> host).

> However I want to make that outgoing mail have reader@newsguy.com in
> both the regular From: line, and envelope from.

> It appear that `genericstable' and `genericsdomain' can do that as
> presented in http://www.tldp.org/HOWTO/Sendmail-Address-Rewrite-3.html

How about reading the real stuff (i.e., the docs that come with sendmail)?
Maybe this might be relevant (cf/README):
		Notice: if you use an MSP (as it is default starting with
		8.12), the MTA will only receive qualified addresses from the
		MSP (as required by the RFCs).  Hence you need to add your
		domain to class {G}.

> FEATURE(genericstable, `hash -o /etc/mail/genericstable') dnl

Do NOT use -o if you want to use the map.

> MAILER_DEFINITIONS

Why is that line here?


You can check your setup with
sendmail -bt
?
/tryflags hs
/try esmtp harry

(and other addresses, as well as the /map command).

-- 
Note: please read the netiquette before posting. I will almost never
reply to top-postings which include a full copy of the previous
article(s) at the end because it's annoying, shows that the poster
is too lazy to trim his article, and it's wasting the time of all readers.
0
Claus
12/13/2016 1:21:54 PM
Claus Aßmann
<ca+sendmail(-no-copies-please)@mine.informatik.uni-kiel.de> writes:

> Harry Putnam  wrote:
>> I have sendmail.mc set to masquerade newsguy.com.  So my mail goes out
>> with envelope from set to harry@newsguy.com (harry being my uid on
>> host).
>
>> However I want to make that outgoing mail have reader@newsguy.com in
>> both the regular From: line, and envelope from.
>
>> It appear that `genericstable' and `genericsdomain' can do that as
>> presented in http://www.tldp.org/HOWTO/Sendmail-Address-Rewrite-3.html
>
> How about reading the real stuff (i.e., the docs that come with sendmail)?
> Maybe this might be relevant (cf/README):
> 		Notice: if you use an MSP (as it is default starting with
> 		8.12), the MTA will only receive qualified addresses from the
> 		MSP (as required by the RFCs).  Hence you need to add your
> 		domain to class {G}.
>
Not clear to me what the significance of that Notice: is. In prior
message I showed content of genericsdomain as:

  d0.local.lan
  newsguy.com

I've since changed it to:
  local.lan
  newsguy.com

Is that incorrect?  (Host full name is d0.local.lan)

I had read from [...]/cf/README prior to posting but was not at all
sure how to carry out what it says.  Hence the post here.

Now with a careful reading, I made changes in genericstable:

  harry+*@d0.local.lan    reader+*@newsguy.com
  harry+*@newsguy.com     reader+*@newsguy.com
  root+*@d0.local.lan     reader+*@newsguy.com

Is that incorrect?

>> FEATURE(genericstable, `hash -o /etc/mail/genericstable') dnl

> Do NOT use -o if you want to use the map.

Done.

>> MAILER_DEFINITIONS
>
> Why is that line here?

That is inserted by the debian generation tools.  I've been altering
there default sendmail.mc... Was not sure why that was there either so
decided to leave it, in case it was important.  I've removed it.

> You can check your setup with
> sendmail -bt
> ?
> /tryflags hs
> /try esmtp harry
>
> (and other addresses, as well as the /map command).

/tryflags hs  returns nothing at all.

/try esmtp harry
  Trying header sender address harry for mailer esmtp
  canonify           input: harry
  Canonify2          input: harry
  Canonify2        returns: harry
  canonify         returns: harry
  1                  input: harry
  1                returns: harry
  HdrFromSMTP        input: harry
  PseudoToReal       input: harry
  PseudoToReal     returns: harry
  MasqSMTP           input: harry
  MasqSMTP         returns: harry < @ *LOCAL* >
  MasqHdr            input: harry < @ *LOCAL* >
  MasqHdr          returns: harry < @ newsguy . com . >
  HdrFromSMTP      returns: harry < @ newsguy . com . >
  final              input: harry < @ newsguy . com . >
  final            returns: harry @ newsguy . com
  Rcode = 0, addr = harry@newsguy.com

It appears to be saying it will send out mail with harry@newsguy.com
in both the mail `From:' field and `envelope From'.

And that is what happens when a mail is sent.

That is exactly what I don't want to do, and is the reason I'm trying
to use genericstable as it's descriptions seem to say it can change
both right and left side of outgoing messages.

My pop3 account with newsguy is `reader@newsguy.com' but my username
on my local host is harry.

Apparently I have yet to figure out the right syntax or something.

0
Harry
12/14/2016 2:12:29 PM
Harry Putnam  wrote:
> Claus Aßmann

> Is that incorrect?  (Host full name is d0.local.lan)

You have to check what the MSP sends to your MTA.  Of course the
simple way is to list all possible domain names.

> Now with a careful reading, I made changes in genericstable:

>   harry+*@d0.local.lan    reader+*@newsguy.com
>   harry+*@newsguy.com     reader+*@newsguy.com
>   root+*@d0.local.lan     reader+*@newsguy.com

> Is that incorrect?

Yes.
Where in cf/README did you find that (RHS) syntax?

If those are now the only entries in the map, then you broke it...

> > sendmail -bt
> > ?
> > /tryflags hs
> > /try esmtp harry
> >
> > (and other addresses, as well as the /map command).
     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

> /tryflags hs  returns nothing at all.

Hmm, did you miss the first line? It would have shown you the help...

> /try esmtp harry

>   Rcode = 0, addr = harry@newsguy.com

> It appears to be saying it will send out mail with harry@newsguy.com
> in both the mail `From:' field and `envelope From'.

> That is exactly what I don't want to do, and is the reason I'm trying

It seems you ignored the rest of my hints to try other addresses
(esp. harry@...) as well as the /map command...

-- 
Note: please read the netiquette before posting. I will almost never
reply to top-postings which include a full copy of the previous
article(s) at the end because it's annoying, shows that the poster
is too lazy to trim his article, and it's wasting the time of all readers.
0
Claus
12/14/2016 11:40:01 PM
Reply: