Operating System - Linux
1752493 Members
5505 Online
108788 Solutions
New Discussion юеВ

Re: create user mailbox (not system users) sendmail

 
SOLVED
Go to solution
monu_1
Regular Advisor

create user mailbox (not system users) sendmail

Hi all,

I am using sendmail and want to create user mail box (not a system user) which only accept/send mails.
How can we add user mailbox?

Thanks in advance
MKS
8 REPLIES 8
Maaz
Valued Contributor

Re: create user mailbox (not system users) sendmail

i think its not possibe.
You must have to create user account, but you may set user's login shell to /bin/false or /bin/noshell so that user just can only access his/her mailbox but cant login on the system.

following command will create user 'james' and set user's shell to /bin/false so that james cant login on the system(but can access email using MUA eg thunderbird/Evolution/kmail or MS Outlook etc)

#useradd james -s /bin/false

Regards
Maaz
Stuart Browne
Honored Contributor
Solution

Re: create user mailbox (not system users) sendmail

You don't need an account to receive mail for a pretend user.

You can use an alias to deliver mail to a mailbox, even without an account. You won't be able to POP it off, only access it locally however.

As for sending, unless you've turned on authentication, then you can send as any user you want.

Adding a line to '/etc/aliases' like:

fakeuser: /var/spool/mail/fakeuser

Then running 'newaliases' will accept mail for 'fakeuser@yourdomain'.
One long-haired git at your service...
monu_1
Regular Advisor

Re: create user mailbox (not system users) sendmail

Thanks Stuart

fakeuser is now geeting message.but how would fakeuser send the mail to others?

Thanks,
MKS
Stuart Browne
Honored Contributor

Re: create user mailbox (not system users) sendmail

If you use 'sendmail' directly to send a message, then the '-f ' flag is your friend.

If you are sending via SMTP, then make sure the client is set up to use the right sending address (which it then puts in the 'MAIL FROM: ' command).

If you want to use 'mail' (or 'mailx' or 'mutt'), well I'm not even sure you can do that.
One long-haired git at your service...
monu_1
Regular Advisor

Re: create user mailbox (not system users) sendmail

Thanks Stuart again,

Now I want to setup MUA with fakeuser account on another machine other then mail server. I did it and start dovecot services on mail server also.

But when fakeuser account fatch the mail from Mail server, It is asking for fakeuser account password.

How can i set fakeuser password?

Thanks in advanced.
MKS
Stuart Browne
Honored Contributor

Re: create user mailbox (not system users) sendmail

umm..

> You won't be able to POP it off, only access it locally however.

Using this method, you can't set a password for it to be collected. If you want to collect it, then set up a username/password pair as normal.
One long-haired git at your service...
monu_1
Regular Advisor

Re: create user mailbox (not system users) sendmail

hi Stuart

in case of above lets fakeuser is a normal account on mailserver, now i want to connect via client, I am getting following error.

error number 0x8000ccc92
Server Response -ERR Auhtentication failed
Your username and password was rejected

I have also unchecked Log on using secure Passward Authentication.

Thanks,
MKS
Ivan Krastev
Honored Contributor

Re: create user mailbox (not system users) sendmail

Hi Manoj,

Just create normal account, disable any logins (ssh, ftp,telnet) for that account and you will have mail only user.

regards,
ivan