Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
So we use sendmail as a relay host to get mail out onto the internet from a location that should not receive mail. Email is only needed for alerts, essentially. All of our servers use this one sendmail server as a smarthost relay. My hope is to get it set up so that if any mail is relayed through this sendmail server to group-list@email.com that is will actually go to the aliased addresses in the include file. :include:/etc/mail/group-list. So far this has not worked. When I try to email group-list@email.com I get a "User unknown" message. From what I am reading this should work with the configuration below. Am I not understanding how sendmail is thinking about this? In my mind I am aliasing all mail to group-list to the list of emails in /etc/mail/group-list, and so they should be the emails that the message actually is delivered too. Any sendmail people that can help me out? Thanks for any help.
This is what I seen in /var/log/maillog when I try to send a message to group-list@email.com using the sendmail server as a smarthost relay from another server
This is what I seen in /var/log/maillog when I try to send a message to group-list@email.com using the sendmail server as a smarthost relay from another server
Garr! I'm sorry, it is a typo. I shot myself in the foot there. I tried again just to make absolutely sure with the group-list@email.com style syntax and it is the same error message.
Quote:
Dec 10 09:41:31 HOST sendmail[7578]: mBAFfVqi007576: to=<group-list@email.com>, delay=00:00:00, xdelay=00:00:00, mailer=esmtp, pri=120670, relay=mail.awesome.com. [63.x.x.x], dsn=5.1.1, stat=User unknown
Dec 10 09:41:31 HOST sendmail[7578]: mBAFfVqi007576: mBAFfVqi007578: DSN: User unknown
My setup looks like this.
[original mail host]->(smart relay)->[sendmail server]->[destination mail server]
I did some traffic sniffing and looking up of DSN messages. I think what is happening is that my sendmail server is attempting to deliver too group-list at the destination domain, and that mail server is responding with a message saying there is no such user and so it fails. What I want to happen is that anything to group-list@awesome.com gets translated on MY server into the email addresses in the alias list. I'm not sure if this is one of the intentions of the alias feature or not. Thank you for your reply, again sorry for the confusion on my typo. Anyone know how I can translate that from address before it leaves my sendmail server?
Well, I kind of solved this for myself. I will detail my solution here in case anyone has the same misconceptions as me.
What I was trying:
I wanted to send an email to group-list@email.com and have it aliased as it was relayed off my server. This did not work as my sendmail instance kept trying to deliver to group-list@email.com directly and that user does not exist. No idea why I thought this was a good idea, it has been a long couple of weeks.
What Does Work:
To do an email distribution list in sendmail. First point, send the original email to a "user" on the sendmail server itself. I set up a dummy user using: useradd -M -s /bin/false group-list. Then I set up my /etc/aliases file:
The cool thing about this is you can put the group-list file wherever you want and make it so people other than root can add names and remove names from their own lists, and you don't need to restart sendmail or remake the aliases db to do it. (remake aliases db by running 'newaliases')
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.