• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

qmail: Reject unencrypted email

Aileron79

New Pleskian
Hi all!

I'd like to create an email account which only accepts encrypted email. This of course shall not affect other users and their mail boxes. I don't have a problem writing a simple script which checks a single message for whether or not it's encrypted. but I have no clue where to hook such a script in a Plesk environment. Plesk obviously uses qmail as an MTA, and as spam usually is filtered at that stage I considered doing a similar thing but I don't know how, especially on a per-user-basis.

If possible I'd like to send an automated response message to unencrypted messages which contains the download link for the public key.

Alternatively I can periodically run a cronjob to check for new mail and filter accordingly, but that's not a very nice solution. I'd like to avoid usage of crond for this.
 
Hello,

qmail has a very nifty system to do everything you want with an email on a per mailbox basis. It is the .qmail file located in

/var/qmail/mailnames/DOMAIN/MAILBOX/.qmail

qmail reads the .qmail file and executes the content line per line. You can place even commands in it to run external scripts if you want/need.

You will find more about it on Life With qmail site at
http://www.lifewithqmail.org/lwq.html#dot-qmail-files

Delivery of a user's mail is usually controlled by one or more ".qmail" (pronounced dot kyoo mail) files--files in the user's home directory with names beginning with .qmail. The dot-qmail man page describes .qmail file usage.

.qmail files contain a list of delivery instructions, one instruction per line. The first character of the line determines what kind of delivery is involved:
Character Delivery Type Value
# none (comment) ignored
| program command to be run by shell
/ or . mbox (if last char isn't a /) pathname of mbox (including the / or .)
/ or . maildir (if last char is a /) pathname of maildir (including the / or .)
& forward address to forward message
letter or number forward address to forward message (including the first char)

You will have to test for yourself when plesk overwrites the file. I can imagine it will get overwritten when you change something to that email via plesk, like adding a forward or so.

Hope this helps,
Jan
 
Back
Top