How to block sending mails?
Clash Royale CLAN TAG#URR8PPP
up vote
1
down vote
favorite
I want to block specific user from sending emails. I tried doing these things which did not help:
- Commented user in
/etc/passwd
- Wrote
passwd -l user
and restartedsendmail
service.
User can't receive mails - that's OK, but they still may send mails. I use Sendmail (port 25) and Dovecot (port 110 POP3).
Any ideas to block a user from sending mails?
sendmail
add a comment |Â
up vote
1
down vote
favorite
I want to block specific user from sending emails. I tried doing these things which did not help:
- Commented user in
/etc/passwd
- Wrote
passwd -l user
and restartedsendmail
service.
User can't receive mails - that's OK, but they still may send mails. I use Sendmail (port 25) and Dovecot (port 110 POP3).
Any ideas to block a user from sending mails?
sendmail
1
The purported duplicate question is about a Posfix system. This question is about, as it says, a Sendmail system. It is not the same answer for both.
â JdeBP
Aug 8 at 10:09
Then it is not dupe.
â peterh
Aug 8 at 19:55
add a comment |Â
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I want to block specific user from sending emails. I tried doing these things which did not help:
- Commented user in
/etc/passwd
- Wrote
passwd -l user
and restartedsendmail
service.
User can't receive mails - that's OK, but they still may send mails. I use Sendmail (port 25) and Dovecot (port 110 POP3).
Any ideas to block a user from sending mails?
sendmail
I want to block specific user from sending emails. I tried doing these things which did not help:
- Commented user in
/etc/passwd
- Wrote
passwd -l user
and restartedsendmail
service.
User can't receive mails - that's OK, but they still may send mails. I use Sendmail (port 25) and Dovecot (port 110 POP3).
Any ideas to block a user from sending mails?
sendmail
sendmail
edited Aug 8 at 10:05
slmâ¦
238k65491662
238k65491662
asked Aug 8 at 9:39
it dev
244
244
1
The purported duplicate question is about a Posfix system. This question is about, as it says, a Sendmail system. It is not the same answer for both.
â JdeBP
Aug 8 at 10:09
Then it is not dupe.
â peterh
Aug 8 at 19:55
add a comment |Â
1
The purported duplicate question is about a Posfix system. This question is about, as it says, a Sendmail system. It is not the same answer for both.
â JdeBP
Aug 8 at 10:09
Then it is not dupe.
â peterh
Aug 8 at 19:55
1
1
The purported duplicate question is about a Posfix system. This question is about, as it says, a Sendmail system. It is not the same answer for both.
â JdeBP
Aug 8 at 10:09
The purported duplicate question is about a Posfix system. This question is about, as it says, a Sendmail system. It is not the same answer for both.
â JdeBP
Aug 8 at 10:09
Then it is not dupe.
â peterh
Aug 8 at 19:55
Then it is not dupe.
â peterh
Aug 8 at 19:55
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
1
down vote
In Sendmail you can add this user to the /etc/mail/access
database file (access.db
) to disallow them from sending emails:
Put their address in the file /etc/mail/access
:
user@my-domain.com REJECT
Then rebuild it:
$ makemap hash /etc/mail/access.db < /etc/mail/access
NOTE: From what I remember you may have to put several permutations of their email address in this file to stop them. so things like user@localhost
, etc.
I do not have a sendmail setup handy, but you can typically use a Makefile
command that's provided in newer implementations of sendmail
.
For more controlling the sending/receiving via Sendmail you can do more specific controls like this in this file:
To:a1@server.vikas.com REJECT # Reject a1 user from recieving mails
From:a1@server.vikas.com REJECT # Reject a1 user from sending mails
References
- How to enable/disable user's access to email (sendmail)
Is it necessary to rebuild it? I am a little frightened to use makemap command
â it dev
Aug 8 at 10:22
I seem to remember that restarting the sendmail service did this as well. But yeah you typically have to rebuild these files in order for sendmail to use them. BTW I just reinstalled sendmail on CentOS 7 and it does still come with amake
command, so you should be able to run that if your setup has it. If you're pensive to do this, back up the whole/etc/mail
dir 1st.
â slmâ¦
Aug 8 at 10:23
1
Good old sendmail...I prefered to deal with it editing .mc files...it would be interesting understanding the problem of the user, blocking users in sendmail wont prevent users/malware scripts form sending email/spam via TCP/25 if the infra-structure allows it.
â Rui F Ribeiro
Aug 8 at 10:48
@slm, may I only restart sendmail service after REJECTING user in access file? Will it help?
â it dev
Aug 8 at 11:13
@itdev - my suggestion was to try doing a restart after adding REJECT entry to see if it triggers a rebuild ofaccess.db
, but I'm 90% sure that you have to rebuild these manually using eitherrehash
or themake
command.
â slmâ¦
Aug 8 at 11:15
 |Â
show 3 more comments
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
In Sendmail you can add this user to the /etc/mail/access
database file (access.db
) to disallow them from sending emails:
Put their address in the file /etc/mail/access
:
user@my-domain.com REJECT
Then rebuild it:
$ makemap hash /etc/mail/access.db < /etc/mail/access
NOTE: From what I remember you may have to put several permutations of their email address in this file to stop them. so things like user@localhost
, etc.
I do not have a sendmail setup handy, but you can typically use a Makefile
command that's provided in newer implementations of sendmail
.
For more controlling the sending/receiving via Sendmail you can do more specific controls like this in this file:
To:a1@server.vikas.com REJECT # Reject a1 user from recieving mails
From:a1@server.vikas.com REJECT # Reject a1 user from sending mails
References
- How to enable/disable user's access to email (sendmail)
Is it necessary to rebuild it? I am a little frightened to use makemap command
â it dev
Aug 8 at 10:22
I seem to remember that restarting the sendmail service did this as well. But yeah you typically have to rebuild these files in order for sendmail to use them. BTW I just reinstalled sendmail on CentOS 7 and it does still come with amake
command, so you should be able to run that if your setup has it. If you're pensive to do this, back up the whole/etc/mail
dir 1st.
â slmâ¦
Aug 8 at 10:23
1
Good old sendmail...I prefered to deal with it editing .mc files...it would be interesting understanding the problem of the user, blocking users in sendmail wont prevent users/malware scripts form sending email/spam via TCP/25 if the infra-structure allows it.
â Rui F Ribeiro
Aug 8 at 10:48
@slm, may I only restart sendmail service after REJECTING user in access file? Will it help?
â it dev
Aug 8 at 11:13
@itdev - my suggestion was to try doing a restart after adding REJECT entry to see if it triggers a rebuild ofaccess.db
, but I'm 90% sure that you have to rebuild these manually using eitherrehash
or themake
command.
â slmâ¦
Aug 8 at 11:15
 |Â
show 3 more comments
up vote
1
down vote
In Sendmail you can add this user to the /etc/mail/access
database file (access.db
) to disallow them from sending emails:
Put their address in the file /etc/mail/access
:
user@my-domain.com REJECT
Then rebuild it:
$ makemap hash /etc/mail/access.db < /etc/mail/access
NOTE: From what I remember you may have to put several permutations of their email address in this file to stop them. so things like user@localhost
, etc.
I do not have a sendmail setup handy, but you can typically use a Makefile
command that's provided in newer implementations of sendmail
.
For more controlling the sending/receiving via Sendmail you can do more specific controls like this in this file:
To:a1@server.vikas.com REJECT # Reject a1 user from recieving mails
From:a1@server.vikas.com REJECT # Reject a1 user from sending mails
References
- How to enable/disable user's access to email (sendmail)
Is it necessary to rebuild it? I am a little frightened to use makemap command
â it dev
Aug 8 at 10:22
I seem to remember that restarting the sendmail service did this as well. But yeah you typically have to rebuild these files in order for sendmail to use them. BTW I just reinstalled sendmail on CentOS 7 and it does still come with amake
command, so you should be able to run that if your setup has it. If you're pensive to do this, back up the whole/etc/mail
dir 1st.
â slmâ¦
Aug 8 at 10:23
1
Good old sendmail...I prefered to deal with it editing .mc files...it would be interesting understanding the problem of the user, blocking users in sendmail wont prevent users/malware scripts form sending email/spam via TCP/25 if the infra-structure allows it.
â Rui F Ribeiro
Aug 8 at 10:48
@slm, may I only restart sendmail service after REJECTING user in access file? Will it help?
â it dev
Aug 8 at 11:13
@itdev - my suggestion was to try doing a restart after adding REJECT entry to see if it triggers a rebuild ofaccess.db
, but I'm 90% sure that you have to rebuild these manually using eitherrehash
or themake
command.
â slmâ¦
Aug 8 at 11:15
 |Â
show 3 more comments
up vote
1
down vote
up vote
1
down vote
In Sendmail you can add this user to the /etc/mail/access
database file (access.db
) to disallow them from sending emails:
Put their address in the file /etc/mail/access
:
user@my-domain.com REJECT
Then rebuild it:
$ makemap hash /etc/mail/access.db < /etc/mail/access
NOTE: From what I remember you may have to put several permutations of their email address in this file to stop them. so things like user@localhost
, etc.
I do not have a sendmail setup handy, but you can typically use a Makefile
command that's provided in newer implementations of sendmail
.
For more controlling the sending/receiving via Sendmail you can do more specific controls like this in this file:
To:a1@server.vikas.com REJECT # Reject a1 user from recieving mails
From:a1@server.vikas.com REJECT # Reject a1 user from sending mails
References
- How to enable/disable user's access to email (sendmail)
In Sendmail you can add this user to the /etc/mail/access
database file (access.db
) to disallow them from sending emails:
Put their address in the file /etc/mail/access
:
user@my-domain.com REJECT
Then rebuild it:
$ makemap hash /etc/mail/access.db < /etc/mail/access
NOTE: From what I remember you may have to put several permutations of their email address in this file to stop them. so things like user@localhost
, etc.
I do not have a sendmail setup handy, but you can typically use a Makefile
command that's provided in newer implementations of sendmail
.
For more controlling the sending/receiving via Sendmail you can do more specific controls like this in this file:
To:a1@server.vikas.com REJECT # Reject a1 user from recieving mails
From:a1@server.vikas.com REJECT # Reject a1 user from sending mails
References
- How to enable/disable user's access to email (sendmail)
answered Aug 8 at 10:11
slmâ¦
238k65491662
238k65491662
Is it necessary to rebuild it? I am a little frightened to use makemap command
â it dev
Aug 8 at 10:22
I seem to remember that restarting the sendmail service did this as well. But yeah you typically have to rebuild these files in order for sendmail to use them. BTW I just reinstalled sendmail on CentOS 7 and it does still come with amake
command, so you should be able to run that if your setup has it. If you're pensive to do this, back up the whole/etc/mail
dir 1st.
â slmâ¦
Aug 8 at 10:23
1
Good old sendmail...I prefered to deal with it editing .mc files...it would be interesting understanding the problem of the user, blocking users in sendmail wont prevent users/malware scripts form sending email/spam via TCP/25 if the infra-structure allows it.
â Rui F Ribeiro
Aug 8 at 10:48
@slm, may I only restart sendmail service after REJECTING user in access file? Will it help?
â it dev
Aug 8 at 11:13
@itdev - my suggestion was to try doing a restart after adding REJECT entry to see if it triggers a rebuild ofaccess.db
, but I'm 90% sure that you have to rebuild these manually using eitherrehash
or themake
command.
â slmâ¦
Aug 8 at 11:15
 |Â
show 3 more comments
Is it necessary to rebuild it? I am a little frightened to use makemap command
â it dev
Aug 8 at 10:22
I seem to remember that restarting the sendmail service did this as well. But yeah you typically have to rebuild these files in order for sendmail to use them. BTW I just reinstalled sendmail on CentOS 7 and it does still come with amake
command, so you should be able to run that if your setup has it. If you're pensive to do this, back up the whole/etc/mail
dir 1st.
â slmâ¦
Aug 8 at 10:23
1
Good old sendmail...I prefered to deal with it editing .mc files...it would be interesting understanding the problem of the user, blocking users in sendmail wont prevent users/malware scripts form sending email/spam via TCP/25 if the infra-structure allows it.
â Rui F Ribeiro
Aug 8 at 10:48
@slm, may I only restart sendmail service after REJECTING user in access file? Will it help?
â it dev
Aug 8 at 11:13
@itdev - my suggestion was to try doing a restart after adding REJECT entry to see if it triggers a rebuild ofaccess.db
, but I'm 90% sure that you have to rebuild these manually using eitherrehash
or themake
command.
â slmâ¦
Aug 8 at 11:15
Is it necessary to rebuild it? I am a little frightened to use makemap command
â it dev
Aug 8 at 10:22
Is it necessary to rebuild it? I am a little frightened to use makemap command
â it dev
Aug 8 at 10:22
I seem to remember that restarting the sendmail service did this as well. But yeah you typically have to rebuild these files in order for sendmail to use them. BTW I just reinstalled sendmail on CentOS 7 and it does still come with a
make
command, so you should be able to run that if your setup has it. If you're pensive to do this, back up the whole /etc/mail
dir 1st.â slmâ¦
Aug 8 at 10:23
I seem to remember that restarting the sendmail service did this as well. But yeah you typically have to rebuild these files in order for sendmail to use them. BTW I just reinstalled sendmail on CentOS 7 and it does still come with a
make
command, so you should be able to run that if your setup has it. If you're pensive to do this, back up the whole /etc/mail
dir 1st.â slmâ¦
Aug 8 at 10:23
1
1
Good old sendmail...I prefered to deal with it editing .mc files...it would be interesting understanding the problem of the user, blocking users in sendmail wont prevent users/malware scripts form sending email/spam via TCP/25 if the infra-structure allows it.
â Rui F Ribeiro
Aug 8 at 10:48
Good old sendmail...I prefered to deal with it editing .mc files...it would be interesting understanding the problem of the user, blocking users in sendmail wont prevent users/malware scripts form sending email/spam via TCP/25 if the infra-structure allows it.
â Rui F Ribeiro
Aug 8 at 10:48
@slm, may I only restart sendmail service after REJECTING user in access file? Will it help?
â it dev
Aug 8 at 11:13
@slm, may I only restart sendmail service after REJECTING user in access file? Will it help?
â it dev
Aug 8 at 11:13
@itdev - my suggestion was to try doing a restart after adding REJECT entry to see if it triggers a rebuild of
access.db
, but I'm 90% sure that you have to rebuild these manually using either rehash
or the make
command.â slmâ¦
Aug 8 at 11:15
@itdev - my suggestion was to try doing a restart after adding REJECT entry to see if it triggers a rebuild of
access.db
, but I'm 90% sure that you have to rebuild these manually using either rehash
or the make
command.â slmâ¦
Aug 8 at 11:15
 |Â
show 3 more comments
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f461242%2fhow-to-block-sending-mails%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
1
The purported duplicate question is about a Posfix system. This question is about, as it says, a Sendmail system. It is not the same answer for both.
â JdeBP
Aug 8 at 10:09
Then it is not dupe.
â peterh
Aug 8 at 19:55