Check authenticated user/identity before sending

roundcubemail
mail
mailserver
v7

(Saito Benkei) #24

In my

/etc/e-smith/events/nethserver-mail-server-update

there’s only the directories structure, no files with code

=====

[root@mail nethserver-mail-server-update]# ls -lR
.:
total 0
drwxr-xr-x 2 root root  6 Mar 19 11:04 services2adjust
drwxr-xr-x 4 root root 28 Mar 19 11:01 templates2expand

./services2adjust:
total 0

./templates2expand:
total 0
drwxr-xr-x 8 root root 90 Mar 19 11:04 etc
drwxr-xr-x 3 root root 17 Mar 19 11:01 var

./templates2expand/etc:
total 0
drwxr-xr-x 2 root root  6 Mar 19 11:04 amavisd
drwxr-xr-x 2 root root  6 Mar 19 11:04 dovecot
drwxr-xr-x 2 root root  6 Mar 19 11:04 pam.d
drwxr-xr-x 3 root root 21 Mar 19 11:01 pki
drwxr-xr-x 2 root root  6 Mar 19 11:04 postfix
drwxr-xr-x 3 root root 20 Mar 19 11:01 systemd

./templates2expand/etc/amavisd:
total 0

./templates2expand/etc/dovecot:
total 0

./templates2expand/etc/pam.d:
total 0

./templates2expand/etc/pki:
total 0
drwxr-xr-x 4 root root 34 Mar 19 11:01 dovecot

./templates2expand/etc/pki/dovecot:
total 0
drwxr-xr-x 2 root root 6 Mar 19 11:04 certs
drwxr-xr-x 2 root root 6 Mar 19 11:04 private

./templates2expand/etc/pki/dovecot/certs:
total 0

./templates2expand/etc/pki/dovecot/private:
total 0

./templates2expand/etc/postfix:
total 0

./templates2expand/etc/systemd:
total 0
drwxr-xr-x 3 root root 31 Mar 19 11:01 system

./templates2expand/etc/systemd/system:
total 0
drwxr-xr-x 2 root root 6 Mar 19 11:04 dovecot.service.d

./templates2expand/etc/systemd/system/dovecot.service.d:
total 0

./templates2expand/var:
total 0
drwxr-xr-x 3 root root 24 Mar 19 11:01 lib

./templates2expand/var/lib:
total 0
drwxr-xr-x 3 root root 27 Mar 19 11:01 nethserver

./templates2expand/var/lib/nethserver:
total 0
drwxr-xr-x 2 root root 6 Mar 19 11:04 sieve-scripts

./templates2expand/var/lib/nethserver/sieve-scripts:
total 0

=====

root@mail nethserver-mail2-server-update]# ls -lR
.:
total 0
lrwxrwxrwx 1 root root 39 Mar 19 11:04 S00initialize-default-databases -> ../actions/initialize-default-databases
lrwxrwxrwx 1 root root 48 Mar 19 11:04 S01nethserver-mail-default-domain-create -> ../actions/nethserver-mail-default-domain-create
lrwxrwxrwx 1 root root 41 Mar 19 11:04 S30nethserver-mail-postmap-update -> ../actions/nethserver-mail-postmap-update
lrwxrwxrwx 1 root root 46 Mar 19 11:04 S40nethserver-mail-create-opendkim-key -> ../actions/nethserver-mail-create-opendkim-key
lrwxrwxrwx 1 root root 38 Mar 19 11:04 S50nethserver-sssd-initkeytabs -> ../actions/nethserver-sssd-initkeytabs
lrwxrwxrwx 1 root root 51 Mar 19 11:04 S95nethserver-mail-server-init-system-users -> ../actions/nethserver-mail-server-init-system-users
lrwxrwxrwx 1 root root 42 Mar 19 11:04 S98nethserver-mail-server-init-acl -> ../actions/nethserver-mail-server-init-acl
drwxr-xr-x 2 root root 82 Mar 19 11:04 services2adjust
drwxr-xr-x 4 root root 28 Mar 19 11:04 templates2expand

./services2adjust:
total 20
-rw-r--r-- 1 root root 8 Mar  8 18:03 dnsmasq
-rw-r--r-- 1 root root 8 Mar  8 18:03 dovecot
-rw-r--r-- 1 root root 8 Mar  8 18:03 opendkim
-rw-r--r-- 1 root root 8 Mar  8 18:03 postfix
-rw-r--r-- 1 root root 8 Mar  8 18:03 rsyslog

./templates2expand:
total 0
drwxr-xr-x 8 root root 145 Mar 19 11:04 etc
drwxr-xr-x 3 root root  17 Mar 19 11:04 var

./templates2expand/etc:
total 0
-rw-r--r-- 1 root root   0 Mar  8 18:03 dnsmasq.conf
drwxr-xr-x 2 root root  85 Mar 19 11:04 dovecot
-rw-r--r-- 1 root root   0 Mar  8 18:03 hosts
drwxr-xr-x 2 root root  62 Mar 19 11:04 opendkim
-rw-r--r-- 1 root root   0 Mar  8 18:03 opendkim.conf
drwxr-xr-x 2 root root  28 Mar 19 11:04 pam.d
drwxr-xr-x 3 root root  21 Mar 19 11:04 pki
drwxr-xr-x 2 root root 114 Mar 22 09:46 postfix
drwxr-xr-x 3 root root  20 Mar 19 11:04 systemd

./templates2expand/etc/dovecot:
total 0
-rw-r--r-- 1 root root 0 Mar  8 18:03 deny.passwd
-rw-r--r-- 1 root root 0 Mar  8 18:03 dovecot.conf
-rw-r--r-- 1 root root 0 Mar  8 18:03 master-users
-rw-r--r-- 1 root root 0 Mar  8 18:03 quota.passwd

./templates2expand/etc/opendkim:
total 0
-rw-r--r-- 1 root root 0 Mar  8 18:03 KeyTable
-rw-r--r-- 1 root root 0 Mar  8 18:03 SigningTable
-rw-r--r-- 1 root root 0 Mar  8 18:03 TrustedHosts

./templates2expand/etc/pam.d:
total 0
-rw-r--r-- 1 root root 0 Mar  8 18:03 dovecot-master

./templates2expand/etc/pki:
total 0
drwxr-xr-x 4 root root 34 Mar 19 11:04 dovecot

./templates2expand/etc/pki/dovecot:
total 0
drwxr-xr-x 2 root root 25 Mar 19 11:04 certs
drwxr-xr-x 2 root root 25 Mar 19 11:04 private

./templates2expand/etc/pki/dovecot/certs:
total 0
-rw-r--r-- 1 root root 0 Mar  8 18:03 dovecot.pem

./templates2expand/etc/pki/dovecot/private:
total 0
-rw-r--r-- 1 root root 0 Mar  8 18:03 dovecot.pem

./templates2expand/etc/postfix:
total 0
-rw-r--r-- 1 root root 0 Mar  8 18:03 internal_access
-rw-r--r-- 1 root root 0 Mar  8 18:03 main.cf
-rw-r--r-- 1 root root 0 Mar  8 18:03 master.cf
-rw-r--r-- 1 root root 0 Mar  8 18:03 recipient_bcc
-rw-r--r-- 1 root root 0 Mar  8 18:03 transport
-rw-r--r-- 1 root root 0 Mar  8 18:03 virtual

./templates2expand/etc/systemd:
total 0
drwxr-xr-x 3 root root 31 Mar 19 11:04 system

./templates2expand/etc/systemd/system:
total 0
drwxr-xr-x 2 root root 25 Mar 19 11:04 dovecot.service.d

./templates2expand/etc/systemd/system/dovecot.service.d:
total 0
-rw-r--r-- 1 root root 0 Mar  8 18:03 limits.conf

./templates2expand/var:
total 0
drwxr-xr-x 3 root root 24 Mar 19 11:04 lib

./templates2expand/var/lib:
total 0
drwxr-xr-x 3 root root 27 Mar 19 11:04 nethserver

./templates2expand/var/lib/nethserver:
total 0
drwxr-xr-x 2 root root 26 Mar 19 11:04 sieve-scripts

./templates2expand/var/lib/nethserver/sieve-scripts:
total 0
-rw-r--r-- 1 root root 0 Mar  8 18:03 before.sieve

(Stéphane de Labrusse) #25

do not make a mistake, I spoke about nethserver-mail-server-save

[root@ns7dev6 ~]# ll -R /etc/e-smith/events/nethserver-mail-server-save/
/etc/e-smith/events/nethserver-mail-server-save/:
total 0
lrwxrwxrwx 1 root root 41 Mar 18 11:15 S30nethserver-mail-postmap-update -> ../actions/nethserver-mail-postmap-update
lrwxrwxrwx 1 root root 39 Mar 18 11:15 S95nethserver-mail-quota-recalc -> ../actions/nethserver-mail-quota-recalc
drwxr-xr-x 2 root root 36 Mar 18 11:15 services2adjust
drwxr-xr-x 4 root root 28 Mar 18 11:15 templates2expand

/etc/e-smith/events/nethserver-mail-server-save/services2adjust:
total 8
-rw-r--r-- 1 root root 7 Mar  8 18:03 dovecot
-rw-r--r-- 1 root root 7 Mar  8 18:03 postfix

/etc/e-smith/events/nethserver-mail-server-save/templates2expand:
total 0
drwxr-xr-x 6 root root 86 Mar 18 11:15 etc
drwxr-xr-x 3 root root 17 Mar 18 11:15 var

/etc/e-smith/events/nethserver-mail-server-save/templates2expand/etc:
total 0
drwxr-xr-x 2 root root 65 Mar 18 11:15 dovecot
drwxr-xr-x 2 root root 62 Mar 18 11:15 opendkim
-rw-r--r-- 1 root root  0 Mar  8 18:03 opendkim.conf
drwxr-xr-x 2 root root 28 Mar 18 11:15 pam.d
drwxr-xr-x 2 root root 97 Mar 18 11:15 postfix

/etc/e-smith/events/nethserver-mail-server-save/templates2expand/etc/dovecot:
total 0
-rw-r--r-- 1 root root 0 Mar  8 18:03 deny.passwd
-rw-r--r-- 1 root root 0 Mar  8 18:03 dovecot.conf
-rw-r--r-- 1 root root 0 Mar  8 18:03 quota.passwd

/etc/e-smith/events/nethserver-mail-server-save/templates2expand/etc/opendkim:
total 0
-rw-r--r-- 1 root root 0 Mar  8 18:03 KeyTable
-rw-r--r-- 1 root root 0 Mar  8 18:03 SigningTable
-rw-r--r-- 1 root root 0 Mar  8 18:03 TrustedHosts

/etc/e-smith/events/nethserver-mail-server-save/templates2expand/etc/pam.d:
total 0
-rw-r--r-- 1 root root 0 Mar  8 18:03 dovecot-master

/etc/e-smith/events/nethserver-mail-server-save/templates2expand/etc/postfix:
total 0
-rw-r--r-- 1 root root 0 Mar  8 18:03 internal_access
-rw-r--r-- 1 root root 0 Mar  8 18:03 main.cf
-rw-r--r-- 1 root root 0 Mar  8 18:03 recipient_bcc
-rw-r--r-- 1 root root 0 Mar  8 18:03 transport
-rw-r--r-- 1 root root 0 Mar  8 18:03 virtual

/etc/e-smith/events/nethserver-mail-server-save/templates2expand/var:
total 0
drwxr-xr-x 3 root root 24 Mar 18 11:15 lib

/etc/e-smith/events/nethserver-mail-server-save/templates2expand/var/lib:
total 0
drwxr-xr-x 3 root root 27 Mar 18 11:15 nethserver

/etc/e-smith/events/nethserver-mail-server-save/templates2expand/var/lib/nethserver:
total 0
drwxr-xr-x 2 root root 26 Mar 18 11:15 sieve-scripts

/etc/e-smith/events/nethserver-mail-server-save/templates2expand/var/lib/nethserver/sieve-scripts:
total 0
-rw-r--r-- 1 root root 0 Mar  8 18:03 before.sieve

(Stéphane de Labrusse) #26

I did a mistake

yes you can use

signal-event nethserver-mail2-server-update

or

nethserver-mail-server-save


(Saito Benkei) #27

I’ve replied to command that @giacomo wrote in his post.

signal-event nethserver-mail-server-update

That command doesn’t work for me with rspamd module installed, so I’ve found why.


(Saito Benkei) #28

Too many commands :slight_smile:


(Saito Benkei) #29

Ok, after some other test it seems that Roundcube and Webtop don’t use SMTP authenticaton (with credentials submitted at login) to send mail so the configuration doesn’t work.

It’s possible to enable SMTP authentication to send mail in Webtop and Roundcube?


(Saito Benkei) #30

If you need more than one user to be able to use the same email address, enter the users separated by comma

for example, you want users u1, u2 and u3 to be able to send as marketing@local.neth.eu :

u1@local.neth.eu u1
u2@local.neth.eu u2
marketing@local.neth.eu u1, u2, u3
@local.neth.eu u2

(Saito Benkei) #31

With latest version of Webtop now it seems YES:

These should be the commands to enable outgoing authentication on webtop:

http://docs.nethserver.org/en/v7/webtop5.html#smtp-setting

But I haven’t tried.