Sendmail Config--Two mail accounts from one shell user.
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.
Sendmail Config--Two mail accounts from one shell user.
Hello All.
I have only a Linux user account on a certain system with a default e-mail address based on my username. However, I want to have a second mail account. The admin is willing to implement this if I can tell him how to configure sendmail for it, but he does not want to create another shell user just for the second e-mail account, even if it has no login capability. Therefore, I need to have a second, totally separate e-mail account that I can access from the same shell user account. (If it makes any difference, I would ultimately want the second e-mail account to be accessible using IMAP as well.)
Unfortunately, I hardly know anything about Linux besides how to type "ls", and the sendmail tutorial that I saw looked like Greek to me without any clear sign of containing the information that I needed. I don't even know if this is possible.
This isn't a total soln, but if you initially just want the email to look as if it came from the 'other' acct, then you can use the mailx -r switch thus
Am I correct in guessing that your code goes in at the shell prompt and not in the sendmail config file? If so, wouldn't I have to type it every time I want to send mail from a different address? (Sorry, I'm still very inexperienced in Linux.)
You're right, that isn't a total solution because I also want to collect incoming mail from the new address and have the messages sent to that address in a separate mailbox. It looks like this would work if I want to re-purpose the original mailbox, though.
Thanks, Lithos. I guess I have to look at the sendmail tutorials more. I'm willing to read, but I'm not sure how to efficiently search for the information I need, since perhaps I'm not describing it using the most accepted terminology.
Can anyone say that it's definitely possible to have multiple mailboxes corresponding to multiple e-mail addresses under a single shell user using Sendmail? I know how to set the MX record with the registrar, but the server needs to know what to do with the mail sent to the new address.
I can say for sure that (on my server with postfix) aliases are working for different email addresses to one single account (local user on server).
I have a customer defined 2 domains and different email addresses to his username, so he receives emails from both addresses on his account.
That's why aliases are for.
Thanks anyway. I've got the impression from different people that Sendmail is a little old fashioned or something, hence people use something else instead. As a user on the system, this is just what I have to work with.
An alias might be a temporary solution, but that sounds similar to a redirect or a forward to the same mailbox. Of course, I'm ultimately looking to have two separate mailboxes. The thing that there is only one of is the shell user account. I guess you understand that already and are just offering a partial solution based on what you know.
I haven't given up yet on the separate mailboxes. If I don't figure that out, then I will possibly pursue aliases.
Thanks anyway. I've got the impression from different people that Sendmail is a little old fashioned or something, hence people use something else instead. ...
....
An alias might be a temporary solution, but that sounds similar to a redirect or a forward to the same mailbox. Of course, I'm ultimately looking to have two separate mailboxes. The thing that there is only one of is the shell user account. I guess you understand that already and are just offering a partial solution based on what you know.
I haven't given up yet on the separate mailboxes. If I don't figure that out, then I will possibly pursue aliases.
Thanks again.
Yes, "alias" is a redirect/forward to 1 (one) mbox,
I honestly don't know how to do it with postfix either (two mailboxes/ one user).
I'll probably have to go reading some more. If anyone has a full solution, please let me know! Thanks again everyone for your information on a partial solution.
I'm not an email expert, but I believe that email in general doesn't allow what you want.
You can fake outgoing email addrs (as per my example) & if this is automated, you can use variables, so it can generate src & destn addrs on the fly if reqd.
Its just a (bash) cmd line.
(I'm hoping this isn't a spam system)
You can have aliases that effectively re-direct, as do .fwd files (old school), so that one user can receive emails sent to other user addrs.
However, I'm reasonably sure (but could be wrong) that at the end of the day, email in general (not just sendmail) can only have one final 'real' inbox per shell acct.
Note that it would be possible (if tedious) to write a front-end that sorts differently addressed emails into different 'apparent' inboxes, so that you appear to have multiple addrs, but that wouldn't alter the underlying truth.
Ok, I've been reading about Sendmail configuration in the meantime, and learned quite a bit from where I started.
Assuming that I have only one mailbox, suppose I configure the following files so that I can catch mail from an alias and have sent mail appear to come from the same alias. Will using IMAP bypass the settings so that sent mail appears to come from the real address, or will it preserve the appearance of coming from the virtual address that I specified? I realize not everyone is familiar with Sendmail, but thought someone might be confident about an answer based on their general understanding of mail handing in Linux.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.