No that way:so the filename should be .dovecot-sieve. instead of .dovecot-sieve?
NAS> dir
total 20
drwxr-xr-x 3 UserA users 4096 May 24 21:55 .
drwxr-xr-x 15 root root 4096 May 18 12:34 ..
drwx------ 13 UserA users 4096 May 24 21:55 .Maildir
-rw-r--r-- 1 UserA root 303 May 24 21:40 .dovecot.sieve
-rw------- 1 UserA users 280 May 24 21:55 .dovecot.sievec
NAS> chmod 0700 .dovecot.sieve
NAS> dir
total 20
drwxr-xr-x 3 UserA users 4096 May 24 21:55 .
drwxr-xr-x 15 root root 4096 May 18 12:34 ..
drwx------ 14 UserA users 4096 May 24 22:01 .Maildir
-rwx------ 1 UserA root 303 May 24 21:40 .dovecot.sieve
-rw------- 1 UserA users 280 May 24 21:55 .dovecot.sievec
equire "fileinto";
if header :comparator "i;ascii-casemap" :contains "subject" "*****SPAM*****" {
fileinto ".Trash";
stop;
} elsif header :comparator "i;ascii-casemap" :contains "from" "info@synology-forum.de" {
fileinto "INBOX.Computer &- Security.Foren.Synology";
stop;
} else {
keep;
}
2. vi main.cf
3. Add this line at end:
virtual_alias_maps=hash:/usr/syno/mailstation/etc/virtual
4. Select virtual:
You can list any mail address to any username!
your_domain1.dk anything
tom@ your_domain1.dk TomPrivate
birthe@ your_domain1.dk BirthePrivate
your_domain2.dk anything
tom@ your_domain2.dk TomWork
birthe@ your_domain2.dk BirtheWork
5. Next you need to compile this file into virtual.db. Login with the PuTTYtel as: User=root, Password=your admin password.
6. Write this: /usr/syno/mailstation/sbin/postmap /usr/syno/mailstation/etc/virtual
7. Check it: cd /usr/syno/mailstation/etc
8. Write: dir
9. Now a virtual.db should be available on the server.
10. Now you need to restart the postfix program:
/usr/syno/mailstation/sbin/postfix stop
/usr/syno/mailstation/sbin/postfix start
11. Now you are done however please allow up to 1 minute before postfix is updated.
If you later change something in the “virtual”, remember to recompile it (step 6).
Also remember if you update the mailstation package or update the Diskstation OS it will overwrite any edits you made before. Backup your files!
create virtual users
To create virtual users you should install dovecotpw as well. It's sources are in src/util (or see alternative below)
make install dovecotpw
and copy the files created into a folder within PATH.
After that the following command creates a user user@domain.tld with password totalSecret hashed with a SSHA in given file
echo user@domain.tld:$(dovecotpw -p "totalGeheim" -s SSHA) >> /opt/etc/dovecot/passwd
After that you'll have to create the following directories
mkdir -p /volume1/homes/vmail/domain.tld/user/.Maildir
chown -R vmail:vmail /volume1/homes/vmail
chmod -R g-rwx,o-rwx /volume1/homes/vmail
An alternative to compiling dovecotpw from source would be the following steps
mkdir /volume1/public/tmp
cd /volume1/public/tmp
ipkg download dovecot
mv dovecot_1.2.0.beta1-2_powerpc.ipk dovecot_1.2.0.beta1-2_powerpc.tar.gz
tar xvzf dovecot_1.2.0.beta1-2_powerpc.tar.gz
tar xvzf data.tar.gz
cp ./opt/sbin/dovecotpw /usr/syno/mailstation/libexec/dovecot/
rm -R /volume1/public/tmp
[FONT=monospace]
[/FONT]/usr/syno/mailstation/libexec/dovecot/deliver -f ${sender} -d ${user}@${nexthop}
/usr/syno/mailstation/libexec/dovecot/deliver -f ${sender} -d ${user}@${nexthop}
leave out the nexthop. That way postfix should translate the email user to respective local user and give this information with the -d ${user} to deliver. If I were you I would give this line above another try.
/usr/syno/mailstation/libexec/dovecot/deliver -f ${sender} -d ${user}
Wenn du das Forum hilfreich findest oder uns unterstützen möchtest, dann gib uns doch einfach einen Kaffee aus.
Als Dankeschön schalten wir deinen Account werbefrei.