Install Procmail Synology

2020. 2. 22. 01:12카테고리 없음

Forum rules 1) Maintenance has been postponed. The upgrade date will be announced later. 2) This is a user forum for Synology users to share experience/help out each other: if you need direct assistance from the Synology technical support team, please use the following form: 3) To avoid putting users' DiskStation at risk, please don't paste links to any patches provided by our Support team as we will systematically remove them. Our Support team will provide the correct patch for your DiskStation model. Here's what I did, and it works very well.

Install procmail: ipkg install procmail In your home directory create 2 files:.forward and.procmail (perhaps.procmailrc, I put them both in just to be safe) In.forward put the following line, quotes and all ' /opt/bin/procmail' In the.procmail file, put the follow lines: PATH=/usr/syno/mailstation/sbin:/usr/syno/mailstation/bin MAILDIR=$HOME/.Maildir DEFAULT=$HOME/.Maildir/new:0. ^Subject.(.SPAM.).SPAM/new The last line:.SPAM/new, is whatever directory you want the SPAM mail to be moved to. Now the email that Spamassassin tags with.SPAM. will go to your SPAM folder while everything else will go to your normal folder. Of course, this is a user by user setting. Anno wrote:But why do I have to install another software? Is it not possible to use the Postfix software already installed on the Synology Diskstation?

I'm pretty sure that this is not possible only using postfix. And if it would be possible then it would not cover the mails you fetch from external accounts. As this would be performed by getmail and dovecot.

So if you want to use server-side filtering then the fastest way is to use the dovecot-sieve. You could send a feature request to Synology. Maybe they will include dovecot-sieve and deliver (the LDA) in future firmware-releases. I translated my howto from our german wiki on my page. It's a bunch of work but I can confirm from my personal experience that dovecot-sieve works finde with the mailstation. Code: I'm sorry to have to inform you that your message could not be delivered to one or more recipients. It's attached below.

For further assistance, please send mail to postmaster. If you do so, please include this problem report. You can delete your own text from the attached returned message. The mail system: can't create user output file.

Command output: procmail: Couldn't create '/opt/var/spool/mail/antony' procmail: Suspicious rcfile '/var/services/homes/antony/.procmailrc' procmail: Couldn't read '/var/services/homes/antony/.procmailrc' Any help would be really helpfull!! Brandon wrote:Yeap.

Chmod 700 did the trick just fine Many thanks jahlives for the info. (should i do that to all users? Will be any problem regarding permissions?). A clean setup for user home dirs should never ever grant group rights or rights for others. Only the owner of the folder should have access. Many programs that use user's home dir won't even work if group right and/or other rights are set on the home dir (for example ssh with private/public key auth and many more). So from security point of view it's better to change chmod to 0700 on every users home dir.

Install Procmail Synology

Brandon wrote:Yeap. Chmod 700 did the trick just fine Many thanks jahlives for the info. (should i do that to all users? Will be any problem regarding permissions?).

A clean setup for user home dirs should never ever grant group rights or rights for others. Only the owner of the folder should have access. Many programs that use user's home dir won't even work if group right and/or other rights are set on the home dir (for example ssh with private/public key auth and many more). So from security point of view it's better to change chmod to 0700 on every users home dir. Yeap, changing the privileges just worked as expected!! Everything is running just great for some days!! Although i still have problem with procmail!!

Any help would be really helpful. Hi, I have found issues with the.procmailrc shown above and after much invesitgation found the solution.

The main issue was that delivering email to the 'new' folder (e.g. '.Maildir/new') causes problems. These are: 1. Errors reported by dovecot 2.

Zero byte files and hence corrupt emails - also can result in mail being bounce. None unique file names for mail, which will result in missing mail/error messages. Below is the configuration I have found that works without any of these issues: In each users home directory you need to place 2 files -.forward and.procmailrc.forward contains (quotes and all) ' /opt/bin/procmail -t' The -t option makes it retry if there is a problem when processing the mail. It places the mail on the queue to be retried a short while later.

Whilst this shouldn't ever happen, it does at least give it a fighting chance.procmailrc contains SHELL=/bin/sh PATH=/usr/syno/mailstation/sbin:/usr/syno/mailstation/bin DEFAULT=$HOME/.Maildir/ MAILDIR=$HOME/.Maildir/:0:. ^X-Spam-Status: Yes.Junk/ Notice I've used the Spam status flag to test against.

This is a safer method than testing the subject line - if you were to reply to an email marked as spam, then got a further reply back, it would go back into the spam again unless you edited the subject line, where as the flag is applied a fresh on each new/updated message. Hope this helps someone, as it's taken quiet some time and testing to get this working properly. Hi I'm trying to set this up, I'm getting a shedload of spam too.

Install Procmail Synology

I've followed everything mentioned, but procmail still isn't moving anything. Is there a dependency or helper app or something that I've missed out? I've installed ipkg and the procmail package and copied the.forward and.procmailrc files into my home folder.

What should the permissions be for those files? Or do the permissions need to be changed in a mail folder somewhere? I tried to change the.procmailrc permissions as a test and mail wasn't delivered at all, so I think i'm getting somewhere.! Any help at all would be greatly appreciated, Thanks!

Install synology on pc

Pendragonf wrote:Just curious if anyone has an update on how to do this with DSM 3.2? Do I still need to install procmail? Can I make the files in a text file and remove the extension.

Procmail is a FILTER and it is a part of the mailsystem, its used by postfix on your synology to deliver mails locally, if you installed the procmail from the ipkg then you have 2 procmails on your system, one in /opt, and one still in Syno ls /usr/syno/mailstation/sbin/ dovecot postalias postconf postfix postlock postmap postsuper saslauthd fetchmail postcat postdrop postkick postlog postqueue procmail sendmail If you do what nobby told you, to define a extra transport, with a.forward file, you define that for this user the transport is not defined by the postfix but directly by procmail. Anyway postfix would have used his own procmail to transport the mail. Now to your question: if you define a home/.procmailrc file without a home/.forward postfix will take care about that and will follow the rules written in the home/.procmailrc so you can uninstall securely the procmail you installed from ipkg, check if there is still the native one in /usr/syno/mailstation/sbin/ and restart postfix with /usr/syno/mailstation/sbin/postfix reload for to configure your procmailrc you need to use vi or mcedit or another editor and work in a shell, because this file starts with a dot.procmailrc ( Its a hidden file. ) if you want to create such a home/.procmailrc file but never never operated in a shell then I tell you how to do it because its relative easy. 1) start the sshd server on your synology (its in your control panel called TERMINAL) 2) download putty to your computer from (its no need to install it, just double click it) 3) log in your synology using putty on the local IP on port 22 with user root (not admin) and your adminpassword 4) assuming your username is pendragonf enter the following. Code: PATH=/usr/syno/mailstation/sbin:/usr/syno/mailstation/bin VERBOSE=off MAILDIR=$HOME/.Maildir DEFAULT=$MAILDIR/ LOGFILE=$HOME/procmail.log LOCKFILE=$HOME/.lockmail #### SPAM Handling begin:0:. ^X-Spam-Flag: YES.Junk/:0:.

Install Procmail Synology Windows 7

^Subject.(.SPAM.).Junk/ #### Spam handling end this will transport emails with.SPAM. to the JUNK folder in the end pres the ESC Button on your keyboard and type the following 4 characters:wq!: - 'attention this is a command' w - 'write' q - 'quit'! - 'do it' to write the file and quit the editor. (to learn to use vi read this: ) 6) exit the shell with exit have a nice day.