• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Solved [Solved] Sendmail working on "send mail address"


New Member

Messages: 6

Hi to all. I'm using Sendmail. I must send all mail sent by the system (cron notifications, for example) to an external address on my central server. For this I do:
  1. set user name: pw usermod root -c "system ID"
  2. set machine hostname: in /etc/hosts:
    Code: "machine real name"
  3. add in .mc file:
    define(`SMART_HOST',`main server address')
  4. add in .mc file:
    define(`RELAY_MAILER_ARGS', `TCP $h PORT')
    because I can not send the standard SMTP port
  5. add in /etc/mail/aliases
    root: "address to send on central server"
  6. make and compile all files etc. etc. etc.

Now I receive the mail on the central server and the correct address, but:
  1. I receive in the mail body the "sender name" = root user name (point 1)
  2. I see in the mail header that the sender address is root@"hostname" (point 2)

OK, now I have to see "sender in body" and "sender in headers" as a specific address, like "machine ID@machine hostname"; for this I try Sendmail's genericstable function, compile the file genericstable.db and add to the .mc file:
but it appears that this does nothing.

And now the question:
  1. for this purpose, is it correct to use genericstable?
  2. if yes, what did I omit for it not to work?

Thanks a lot for the support.