HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   General (http://www.howtoforge.com/forums/forumdisplay.php?f=25)
-   -   Disable smtp for a client (http://www.howtoforge.com/forums/showthread.php?t=57727)

danypd69 25th June 2012 10:22

Disable smtp for a client
 
Hello, I need to disable the possibility to use smtp to some clients;
Is this possible? I saw that there is a "disablesmtp" field in the mail_user table but it seems that it's not used anywhere.

till 25th June 2012 10:59

You can disable smtp for a client by enabling the "Disablesmtp" field in the mailbox settings. This value is used by postfix and dovecot/courier.

danypd69 25th June 2012 11:09

1 Attachment(s)
Do you mean in the web interface? I don't see any Disablesmtp field, only Disable POP3 and Disable IMAP

till 25th June 2012 11:14

You're right, the field is named "Enable receiving". Disable that checkbox to disable smtp.

danypd69 25th June 2012 11:16

Ok I will try, but does it disable also smtp receiving? I need to disable the possibility to use my server to send mail only

UPDATE: Tried it but also smtp receiving is disabled.

Any pointer to disable only smtp out ?

falko 26th June 2012 12:54

I think you can use transports and route those emails to some non-existing account. See
Code:

man 5 transport

danypd69 26th June 2012 12:57

Ok I will check it.
Another idea that I had is to refuse authentication to selected usernames but I'm unable to understand fully how smtp authentication works in ISPConfig

Dehumanizer 21st October 2012 19:30

Patch to implement this feature
 
1 Attachment(s)
I wanted the same feature, i.e. disable SMTP for certain users but on the other hand don't disable receiving for that account (so it can receive mail).
I have found that the code and data structures for doing that is already there, configuration for disabling and enabling of email receiving and smtp access are separate even in the database, just the frontent is done in a way that checking the "disable receiving" checkbox disables both these features at the same time, I'm not sure why it isn't split into "disable receiving" and "disable SMTP".

So I made a little patch to split these features for ISPConfig 3.0.4.6, I'm attaching the patch file here.

Instructions:
1. save the file to /usr/local/ispconfig/interface/web/mail
2. gunzip disablesmtp.patch.gz
3. patch -p1 -i disablesmtp.patch
4. go to your ISPConfig panel to the user mailbox settings, there should be a new checkbox "Disable SMTP" available.

Notes:
-disabling SMTP does not affect the ability to send email through webmail.
-I have added the checkbox text just for english language, if you are using a different language, you need to add a line "$wb["disablesmtp_txt"] = 'Disable SMTP';" in the corresponding language file <lang>_mail_user.lng file in the /usr/local/ispconfig/interface/web/mail/lib/lang directory where <lang> is the language you want to edit. You can of course translate the "Disable SMTP" string to your language.
If you don't do this and you are using a language other than english, the checkbox will still be there and will work, but will have no caption.

Enjoy!

danypd69 6th November 2012 18:12

Thanks, I will try it as soon as possible.

bert 4th March 2013 10:13

Great patch, thanks. I do consider this a bug in ISPconfig, and have filed a report at http://bugtracker.ispconfig.org/inde...s&task_id=2762


All times are GMT +2. The time now is 20:15.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.