generated from smedev/Template-for-SMEServer-Core-Package
Compare commits
12 Commits
1_0-3_el8_
...
master
Author | SHA1 | Date | |
---|---|---|---|
58298abe3a | |||
72362ffc32 | |||
8dff3cd3fc | |||
23c9a3a595 | |||
abba39ab3c | |||
de44e4000a | |||
fddc92eb16 | |||
77135e244f | |||
df66a327cc | |||
0e6e82c9a1 | |||
0cec86dcb7 | |||
f2b33f4260 |
58
README.md
58
README.md
@ -20,51 +20,33 @@ Show list of outstanding bugs:
|
|||||||
Koozali SME Server wrapper to configure postfix
|
Koozali SME Server wrapper to configure postfix
|
||||||
|
|
||||||
## Development and testing
|
## Development and testing
|
||||||
```
|
|
||||||
mkdir -p /etc/e-smith/templates-custom/var/service/{qpsmtpd,sqpsmtpd,uqpsmtpd}/config/peers/{0,local}/90queue-qmail-queue
|
|
||||||
echo 'queue/postfix-queue' > /etc/e-smith/templates-custom/var/service/{qpsmtpd,sqpsmtpd,uqpsmtpd}/config/peers/{0,local}/90queue-qmail-queue
|
|
||||||
config setprop qmail status disabled
|
|
||||||
systemctl stop qmail
|
|
||||||
signal-event email-update
|
|
||||||
dnf install smeserver-postfix
|
|
||||||
```
|
|
||||||
|
|
||||||
|
|
||||||
then test
|
|
||||||
```
|
```
|
||||||
echo "This email confirms that Postfix is working" | mail -s "Testing Posfix" emailuser@example.com
|
echo "This email confirms that Postfix is working" | mail -s "Testing Posfix" emailuser@example.com
|
||||||
```
|
```
|
||||||
or using roundcube/ mail client
|
or using roundcube/ mail client
|
||||||
|
|
||||||
|
|
||||||
to remove
|
|
||||||
```
|
|
||||||
rm -rf /etc/e-smith/templates-custom/var/service/{qpsmtpd,sqpsmtpd,uqpsmtpd}/config/peers/{0,local}/
|
|
||||||
config setprop qmail status enabled
|
|
||||||
systemctl start qmail
|
|
||||||
signal-event email-update
|
|
||||||
dnf remove smeserver-postfix
|
|
||||||
```
|
|
||||||
|
|
||||||
|
|
||||||
DONE
|
DONE
|
||||||
* main domain
|
* main domain
|
||||||
* listen only socket
|
* listen only socket
|
||||||
* virtual alias for system, pseudonyms, groups, shared
|
* virtual alias for system, pseudonyms, groups, shared
|
||||||
|
* forward email support via .qmail
|
||||||
|
* spam filtering to .junk
|
||||||
|
* .qmail support using mini-qmail + wrapper and seakablepipe
|
||||||
|
* maildrop/procmail support directly via .qmail
|
||||||
|
* check /usr/sbin/sendmail -> /etc/alternatives/mta -> /usr/sbin/sendmail.postfix
|
||||||
|
* EmailUnknownUser support in virtual
|
||||||
|
* migrate and remove qmail properties to postfix
|
||||||
|
* make a copy of /var/qmail/control/smtproutes to (su)qpsmtpd/config/smtproutes
|
||||||
|
|
||||||
TODO
|
TODO
|
||||||
* regression: forward email support via .qmail or .forward
|
|
||||||
* regression: spam filtering to .junk
|
|
||||||
* regression: .qmail support or alternative via .forward
|
|
||||||
* regression: maildrop/procmail support directly or via .forward or via .qmail support
|
|
||||||
* regression: EmailUnknownUser support ( we can not use luser_relay as we use virtual_alias (this might need to add all unix accoutns in this virtual map and also all needed content of /etc/aliases when not returntosender)
|
|
||||||
* switch smeserver-qpsmtpd support to postfix
|
|
||||||
* check /usr/sbin/sendmail -> /etc/alternatives/mta -> /usr/sbin/sendmail.postfix upon removal/update of qmail
|
|
||||||
* .foward support
|
|
||||||
* remove from smeserver-mail /usr/local/sbin/smtp-auth-proxy.pl
|
* remove from smeserver-mail /usr/local/sbin/smtp-auth-proxy.pl
|
||||||
* migrate and rewrite code for smtp-auth-proxy properties
|
* migrate and rewrite code for smtp-auth-proxy properties
|
||||||
* migrate and remove qmail properties to postfix
|
* panel to list / manage queue
|
||||||
* make a copy of qmail/config/smtproutes to (su)qpsmtpd/config/smtproutes
|
|
||||||
|
FUTURE
|
||||||
|
* .foward support, when/if .qmail support is dropped
|
||||||
|
* ldap / AD user support
|
||||||
|
* throttle for some destination
|
||||||
|
|
||||||
TO CHECK
|
TO CHECK
|
||||||
$prop->{Blacklist} = $smtp_proxy_rec->prop('Blacklist') || " ";
|
$prop->{Blacklist} = $smtp_proxy_rec->prop('Blacklist') || " ";
|
||||||
@ -80,11 +62,11 @@ domain
|
|||||||
config
|
config
|
||||||
* DelegateMailServer
|
* DelegateMailServer
|
||||||
* SMTPSmartHost
|
* SMTPSmartHost
|
||||||
* qmail/postfix->MaxMessageSize defined as 15Mb
|
* postfix->MaxMessageSize defined as 15Mb
|
||||||
* qmail/postfix->FilterType (empty)
|
* postfix->FilterType (empty)
|
||||||
* qmail/postfix->ConcurrencyRemote default to 20
|
* postfix->ConcurrencyRemote default to 20
|
||||||
* qmail/postfix->ConcurrencyLocal default to 20
|
* postfix->ConcurrencyLocal default to 20
|
||||||
* qmail/postfix->DoubleBounceTo default to postmaster
|
* postfix->DoubleBounceTo default to postmaster
|
||||||
* postfix->tls_security_level default to may
|
* postfix->tls_security_level default to may
|
||||||
* postfix->tls_enforce_peername default to yes
|
* postfix->tls_enforce_peername default to yes
|
||||||
* $qpsmtpd{HeloHost} default to $myhostname
|
* $qpsmtpd{HeloHost} default to $myhostname
|
||||||
@ -95,6 +77,8 @@ config
|
|||||||
* EmailUnknownUser (default to returntosender)
|
* EmailUnknownUser (default to returntosender)
|
||||||
|
|
||||||
REFERENCES
|
REFERENCES
|
||||||
|
* https://serverfault.com/questions/638152/how-to-remove-postfix-queue-messages-sent-to-a-specific-domain
|
||||||
|
* https://unix.stackexchange.com/questions/93197/postfix-configuration-to-verify-all-recipients
|
||||||
* https://phoenixnap.com/kb/postfix-smtp
|
* https://phoenixnap.com/kb/postfix-smtp
|
||||||
* https://www.gentei.org/~yuuji/software/dotqmail/
|
* https://www.gentei.org/~yuuji/software/dotqmail/
|
||||||
* https://www.gentei.org/~yuuji/software/dotqmail/dotqmail
|
* https://www.gentei.org/~yuuji/software/dotqmail/dotqmail
|
||||||
|
@ -14,6 +14,7 @@ foreach (qw(
|
|||||||
transport
|
transport
|
||||||
virtual
|
virtual
|
||||||
sasl_passwd
|
sasl_passwd
|
||||||
|
generic
|
||||||
))
|
))
|
||||||
{
|
{
|
||||||
templates2events("/etc/postfix/$_", qw(
|
templates2events("/etc/postfix/$_", qw(
|
||||||
@ -213,6 +214,13 @@ safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/uqpsmtpd
|
|||||||
# files(s) to be backed up
|
# files(s) to be backed up
|
||||||
#));
|
#));
|
||||||
|
|
||||||
|
#--------------------------------------------------
|
||||||
|
# actions for pseudonym-{create,delete,modify}
|
||||||
|
#--------------------------------------------------
|
||||||
|
foreach $event ( qw(pseudonym-create pseudonym-modify pseudonym-delete) )
|
||||||
|
{
|
||||||
|
safe_symlink("reload-or-restart", "root/etc/e-smith/events/$event/services2adjust/postfix");
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
14
root/etc/e-smith/db/configuration/migrate/postfix
Normal file
14
root/etc/e-smith/db/configuration/migrate/postfix
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
{
|
||||||
|
# migrate qmail -> postfix MaxMessageSize FilterType ConcurrencyRemote ConcurrencyLocal DoubleBounceTo
|
||||||
|
# we keep qmail as MDA so we can leave DeliveryType DeliveryInstruction
|
||||||
|
for ( qw( MaxMessageSize FilterType ConcurrencyRemote ConcurrencyLocal DoubleBounceTo) ) {
|
||||||
|
my $sa = $DB->get('qmail') or next;
|
||||||
|
my $value=$DB->get_prop_and_delete('qmail',$_) or next;
|
||||||
|
next if (exists $postfix{$_});
|
||||||
|
$DB->set_prop('postfix', $_ , $value);
|
||||||
|
}
|
||||||
|
|
||||||
|
# TODO we migrate smtp-auth-proxy ; SMTPSmartHost Userid Passwd PeerPort
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,2 @@
|
|||||||
|
#change myorigin to local domain for outgoing emails
|
||||||
|
@{$SystemName} @{$DomainName}
|
1
root/etc/e-smith/templates/etc/postfix/main.cf/05compat
Normal file
1
root/etc/e-smith/templates/etc/postfix/main.cf/05compat
Normal file
@ -0,0 +1 @@
|
|||||||
|
compatibility_level=2
|
@ -1 +1,7 @@
|
|||||||
myorigin = $mydomain
|
{
|
||||||
|
# do not put a domain that will be used to recieve emails there
|
||||||
|
# if you do so you will lose email with the virtual rewriting process.
|
||||||
|
# this will complete local sent email and virtual right hands
|
||||||
|
}# do not put real domain there to avoid loop, or catch-all issues
|
||||||
|
myorigin = $myhostname
|
||||||
|
append_at_myorigin = yes
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
{
|
{
|
||||||
# qmail compatibility - instead of +
|
# qmail compatibility - instead of +
|
||||||
# default empty
|
# default empty
|
||||||
}
|
}recipient_delimiter = -
|
||||||
recipient_delimiter = -
|
expand_owner_alias = yes
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
# SME Primary domain and host: looks up all recipients in /etc/passwd and /etc/aliases
|
# SME Primary domain and host: looks up all recipients in /etc/passwd and /etc/aliases
|
||||||
mydestination = $myhostname $mydomain $myhostname.$mydomain localhost.$mydomain localhost {
|
mydestination = $myorigin $myhostname $mydomain $myhostname.$mydomain localhost.$mydomain localhost {
|
||||||
$OUT = " ";
|
$OUT = " ";
|
||||||
my $i = 0;
|
my $i = 0;
|
||||||
use esmith::DomainsDB;
|
use esmith::DomainsDB;
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
my $display = 0;
|
my $display = 0;
|
||||||
use esmith::DomainsDB;
|
use esmith::DomainsDB;
|
||||||
my $domainsdb = esmith::DomainsDB->open_ro();
|
my $domainsdb = esmith::DomainsDB->open_ro();
|
||||||
for my $domain ($domainsdb->domains)
|
for my $domain ($domainsdb->get_all)
|
||||||
{
|
{
|
||||||
my $mail_server = $domain->prop('MailServer')
|
my $mail_server = $domain->prop('MailServer')
|
||||||
|| $DelegateMailServer
|
|| $DelegateMailServer
|
||||||
|
@ -0,0 +1,5 @@
|
|||||||
|
{
|
||||||
|
# we use the value of EmailUnknownUser (default to returntosender)
|
||||||
|
return "# we bounce all unknown address $EmailUnknownUser not set or equal to returntosender " unless (defined $EmailUnknownUser and $EmailUnknownUser ne 'returntosender');
|
||||||
|
$OUT ="luser_relay = $EmailUnknownUser";
|
||||||
|
}
|
@ -1 +1 @@
|
|||||||
smtp_helo_name = { $qpsmtpd{HeloHost} || '$myhostname'}
|
smtp_helo_name = { $qpsmtpd{HeloHost} || '$mydomain' }
|
||||||
|
@ -11,7 +11,7 @@ smtp_tls_note_starttls_offer = yes
|
|||||||
# was issued by a CA that is trusted by the Postfix SMTP client
|
# was issued by a CA that is trusted by the Postfix SMTP client
|
||||||
}smtp_tls_security_level = {
|
}smtp_tls_security_level = {
|
||||||
my $smarthost = $SMTPSmartHost || "off";
|
my $smarthost = $SMTPSmartHost || "off";
|
||||||
my $userid = ${smtp-auth-proxy}{'Userid'} || "";
|
my $userid = ${'smtp-auth-proxy'}{'Userid'} || "";
|
||||||
my $tls_security_level = $postfix{'tls_security_level'} || "may";
|
my $tls_security_level = $postfix{'tls_security_level'} || "may";
|
||||||
$tls_security_level = "encrypt" if ($smarthost ne "off" && $userid ne "");
|
$tls_security_level = "encrypt" if ($smarthost ne "off" && $userid ne "");
|
||||||
$OUT = $tls_security_level;
|
$OUT = $tls_security_level;
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
## SME relay outgoing mails to smarthost
|
## SME relay outgoing mails to smarthost
|
||||||
{
|
{
|
||||||
my $smarthost = $SMTPSmartHost || "off";
|
my $smarthost = $SMTPSmartHost || "off";
|
||||||
my $userid = ${smtp-auth-proxy}{'Userid'} || "";
|
my $userid = ${'smtp-auth-proxy'}{'Userid'} || "";
|
||||||
my $password = ${smtp-auth-proxy}{'Passwd'} || "";
|
my $password = ${'smtp-auth-proxy'}{'Passwd'} || "";
|
||||||
my $port = ${smtp-auth-proxy}{'PeerPort'} || "25";
|
my $port = ${'smtp-auth-proxy'}{'PeerPort'} || "25";
|
||||||
return "#Smarthost disabled" unless $smarthost ne "off";
|
return "#Smarthost disabled" unless $smarthost ne "off";
|
||||||
$OUT = "relayhost = [$smarthost]:$port\n";
|
$OUT = "relayhost = [$smarthost]:$port\n";
|
||||||
if ($userid ne "")
|
if ($userid ne "")
|
||||||
|
22
root/etc/e-smith/templates/etc/postfix/main.cf/80qmail
Normal file
22
root/etc/e-smith/templates/etc/postfix/main.cf/80qmail
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
# qmail local delivery{
|
||||||
|
|
||||||
|
## alternatively we could set a db with per user delivery
|
||||||
|
|
||||||
|
# mailbox_command_maps = hash:/etc/postfix/mailbox_commands
|
||||||
|
|
||||||
|
## in /etc/postfix/mailbox_commands
|
||||||
|
# # These users need qmail-local delivery.
|
||||||
|
# johndoe /usr/local/libexec/postqmail-local
|
||||||
|
# janedoe /usr/local/libexec/postqmail-local
|
||||||
|
|
||||||
|
###########################################
|
||||||
|
# alternatively we could ask dovecot to handle the delivery
|
||||||
|
#mailbox_command = /usr/libexec/dovecot/dovecot-lda -f "$SENDER" -a "$RECIPIENT" -d "$USER"
|
||||||
|
# then sieve rules are needed
|
||||||
|
|
||||||
|
# maildrop or procmail could do to ....
|
||||||
|
}
|
||||||
|
prepend_delivered_header = file, forward
|
||||||
|
mailbox_command = /usr/bin/postqmail-local
|
||||||
|
# qmail needs to forward to qmqpd
|
||||||
|
qmqpd_authorized_clients = 127.0.0.1
|
@ -0,0 +1,2 @@
|
|||||||
|
# rewrite addresse of outgoing emails
|
||||||
|
smtp_generic_maps = hash:/etc/postfix/generic
|
@ -1,5 +1,3 @@
|
|||||||
#2525 inet n - n - - smtpd
|
|
||||||
# :25 is in use by qpsmtpd
|
|
||||||
#smtp inet n - n - - smtpd
|
#smtp inet n - n - - smtpd
|
||||||
#smtp inet n - n - 1 postscreen
|
#smtp inet n - n - 1 postscreen
|
||||||
#smtpd pass - - n - - smtpd
|
#smtpd pass - - n - - smtpd
|
||||||
|
1
root/etc/e-smith/templates/etc/postfix/master.cf/34qmqpd
Normal file
1
root/etc/e-smith/templates/etc/postfix/master.cf/34qmqpd
Normal file
@ -0,0 +1 @@
|
|||||||
|
628 inet n - n - - qmqpd
|
@ -1,4 +1,3 @@
|
|||||||
#628 inet n - n - - qmqpd
|
|
||||||
pickup unix n - n 60 1 pickup
|
pickup unix n - n 60 1 pickup
|
||||||
cleanup unix n - n - 0 cleanup
|
cleanup unix n - n - 0 cleanup
|
||||||
qmgr unix n - n 300 1 qmgr
|
qmgr unix n - n 300 1 qmgr
|
||||||
|
4
root/etc/e-smith/templates/etc/postfix/master.cf/36qmail
Normal file
4
root/etc/e-smith/templates/etc/postfix/master.cf/36qmail
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
# qmail need to test for virtual boxes
|
||||||
|
qmail-local unix - n n - - pipe
|
||||||
|
user=$USER argv=/usr/bin/sudo -u $user -H /usr/bin/postqmail-local ${mailbox} ${extension} ${nexthop} ${sender}
|
||||||
|
|
@ -1,9 +1,9 @@
|
|||||||
## SME relay outgoing mails to smarthost
|
## SME relay outgoing mails to smarthost
|
||||||
{
|
{
|
||||||
my $smarthost = $SMTPSmartHost || "off";
|
my $smarthost = $SMTPSmartHost || "off";
|
||||||
my $userid = ${smtp-auth-proxy}{'Userid'} || "";
|
my $userid = ${'smtp-auth-proxy'}{'Userid'} || "";
|
||||||
my $password = ${smtp-auth-proxy}{'Passwd'} || "";
|
my $password = ${'smtp-auth-proxy'}{'Passwd'} || "";
|
||||||
my $port = ${smtp-auth-proxy}{'PeerPort'} || "25";
|
my $port = ${'smtp-auth-proxy'}{'PeerPort'} || "25";
|
||||||
return "#Smarthost disabled" unless $smarthost ne "off";
|
return "#Smarthost disabled" unless $smarthost ne "off";
|
||||||
$OUT = "";
|
$OUT = "";
|
||||||
if ($userid ne "")
|
if ($userid ne "")
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
for my $domain ($domainsdb->domains)
|
for my $domain ($domainsdb->get_all)
|
||||||
{
|
{
|
||||||
|
|
||||||
my $mail_server = $domain->prop('MailServer')
|
my $mail_server = $domain->prop('MailServer')
|
||||||
|
@ -15,7 +15,6 @@ root admin
|
|||||||
|
|
||||||
for my $acct ($adb->get_all_by_prop(type=>"system"))
|
for my $acct ($adb->get_all_by_prop(type=>"system"))
|
||||||
{
|
{
|
||||||
next if ($acct->key eq "admin");
|
|
||||||
next if ($acct->key eq "alias");
|
next if ($acct->key eq "alias");
|
||||||
next if ($acct->key eq "shared");
|
next if ($acct->key eq "shared");
|
||||||
next if ($acct->key eq "root");
|
next if ($acct->key eq "root");
|
||||||
|
@ -1,3 +1,19 @@
|
|||||||
# SME users
|
# SME users
|
||||||
# not needed postfix will map all system users directly
|
{
|
||||||
|
my $dms = $DelegateMailServer;
|
||||||
|
|
||||||
|
return "# DelegateMailServer is set" if ($dms && ($dms !~ /^\s*$/));
|
||||||
|
|
||||||
|
$OUT = "";
|
||||||
|
|
||||||
|
use esmith::AccountsDB;
|
||||||
|
|
||||||
|
my $adb = esmith::AccountsDB->open_ro or die "Couldn't open AccountsDB";
|
||||||
|
|
||||||
|
for my $user ($adb->users)
|
||||||
|
{
|
||||||
|
#next unless ($pseudo->key =~ /@/); <== aliase to emails or catch-all @domain.com are ok
|
||||||
|
$OUT .= $user->key . "\t\t\t".$user->key."\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@ -25,6 +25,6 @@
|
|||||||
push @members, $user;
|
push @members, $user;
|
||||||
}
|
}
|
||||||
my $members = join(' ', @members);
|
my $members = join(' ', @members);
|
||||||
$OUT .= "$acct\t\t\t$members\n";
|
$OUT .= "$acct\t\t\t$members\n" if $members;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,17 @@
|
|||||||
|
{
|
||||||
|
return "" ; #not used
|
||||||
|
# as we might have virtualdomains we prefer this over luser_relay
|
||||||
|
return "# we bounce all unknown address $EmailUnknownUser not set or equal to returntosender " unless (defined $EmailUnknownUser and $EmailUnknownUser ne 'returntosender');
|
||||||
|
$OUT = "catch-all";
|
||||||
|
my $i = 0;
|
||||||
|
use esmith::DomainsDB;
|
||||||
|
my $ddb = esmith::DomainsDB->open_ro;
|
||||||
|
my @domains = map { $_->key } $ddb->get_all_by_prop('type' => 'domain');
|
||||||
|
foreach my $domain ( @domains )
|
||||||
|
{
|
||||||
|
my $d = $ddb->get($domain);
|
||||||
|
next if (($d->prop('VirtualMail') || "disabled") eq "enabled");
|
||||||
|
next unless (($d->prop('MailServer') || '') eq '');
|
||||||
|
$OUT .= "\@$domain $EmailUnknownUser\n";
|
||||||
|
}
|
||||||
|
}
|
@ -2,6 +2,9 @@
|
|||||||
/usr/sbin/e-smith/expand-template /etc/postfix/virtual
|
/usr/sbin/e-smith/expand-template /etc/postfix/virtual
|
||||||
/usr/sbin/e-smith/expand-template /etc/postfix/sasl_passwd
|
/usr/sbin/e-smith/expand-template /etc/postfix/sasl_passwd
|
||||||
/usr/sbin/e-smith/expand-template /etc/postfix/transport
|
/usr/sbin/e-smith/expand-template /etc/postfix/transport
|
||||||
|
/usr/sbin/e-smith/expand-template /etc/postfix/generic
|
||||||
|
/usr/sbin/e-smith/expand-template /etc/postfix/main.cf
|
||||||
|
/usr/sbin/e-smith/expand-template /etc/postfix/master.cf
|
||||||
# sensitive file, we want to be sure.
|
# sensitive file, we want to be sure.
|
||||||
touch /etc/postfix/sasl_passwd.db
|
touch /etc/postfix/sasl_passwd.db
|
||||||
chmod 0600 /etc/postfix/sasl_passwd.db
|
chmod 0600 /etc/postfix/sasl_passwd.db
|
||||||
@ -9,3 +12,4 @@ chown root:root /etc/postfix/sasl_passwd.db
|
|||||||
/usr/sbin/postmap /etc/postfix/virtual
|
/usr/sbin/postmap /etc/postfix/virtual
|
||||||
/usr/sbin/postmap /etc/postfix/sasl_passwd
|
/usr/sbin/postmap /etc/postfix/sasl_passwd
|
||||||
/usr/sbin/postmap /etc/postfix/transport
|
/usr/sbin/postmap /etc/postfix/transport
|
||||||
|
/usr/sbin/postmap /etc/postfix/generic
|
||||||
|
@ -2,11 +2,16 @@
|
|||||||
/usr/sbin/e-smith/expand-template /etc/postfix/virtual
|
/usr/sbin/e-smith/expand-template /etc/postfix/virtual
|
||||||
/usr/sbin/e-smith/expand-template /etc/postfix/sasl_passwd
|
/usr/sbin/e-smith/expand-template /etc/postfix/sasl_passwd
|
||||||
/usr/sbin/e-smith/expand-template /etc/postfix/transport
|
/usr/sbin/e-smith/expand-template /etc/postfix/transport
|
||||||
|
/usr/sbin/e-smith/expand-template /etc/postfix/generic
|
||||||
|
#TODO /usr/sbin/e-smith/expand-template /etc/postfix/main.cf
|
||||||
|
#TODO /usr/sbin/e-smith/expand-template /etc/postfix/master.cf
|
||||||
# sensitive file, we want to be sure.
|
# sensitive file, we want to be sure.
|
||||||
touch /etc/postfix/sasl_passwd.db
|
touch /etc/postfix/sasl_passwd.db
|
||||||
chmod 0600 /etc/postfix/sasl_passwd.db
|
chmod 0600 /etc/postfix/sasl_passwd.db
|
||||||
chown root:root /etc/postfix/sasl_passwd.db
|
chown root:root /etc/postfix/sasl_passwd.db
|
||||||
|
/usr/libexec/postfix/aliasesdb
|
||||||
/usr/sbin/postmap /etc/postfix/virtual
|
/usr/sbin/postmap /etc/postfix/virtual
|
||||||
/usr/sbin/postmap /etc/postfix/sasl_passwd
|
/usr/sbin/postmap /etc/postfix/sasl_passwd
|
||||||
/usr/sbin/postmap /etc/postfix/transport
|
/usr/sbin/postmap /etc/postfix/transport
|
||||||
|
/usr/sbin/postmap /etc/postfix/generic
|
||||||
/usr/sbin/postfix reload
|
/usr/sbin/postfix reload
|
||||||
|
@ -7,7 +7,7 @@ dotqm=${DOTQMAIL:-.qmail}
|
|||||||
DQHOME=${DQHOME:-$HOME}
|
DQHOME=${DQHOME:-$HOME}
|
||||||
cd $DQHOME
|
cd $DQHOME
|
||||||
DEFAULTSPOOL=./Maildir/
|
DEFAULTSPOOL=./Maildir/
|
||||||
PATH=${PATH}:/usr/sbin:/usr/lib; export PATH
|
PATH=${PATH}:/usr/sbin:/usr/lib:/var/qmail/bin; export PATH
|
||||||
if [ -s $DQHOME/.dotqmailexts ]; then
|
if [ -s $DQHOME/.dotqmailexts ]; then
|
||||||
while IFS=: read ext home; do
|
while IFS=: read ext home; do
|
||||||
home=${home/\~\//$HOME/}
|
home=${home/\~\//$HOME/}
|
||||||
|
@ -5,9 +5,8 @@
|
|||||||
# $3 = $DOMAIN
|
# $3 = $DOMAIN
|
||||||
# $4 = $SENDER
|
# $4 = $SENDER
|
||||||
export PATH=$PATH:/usr/local/bin:/var/qmail/bin
|
export PATH=$PATH:/usr/local/bin:/var/qmail/bin
|
||||||
tail +2 | seekablepipe qmail-local -- \
|
tail -n +2 | /usr/local/bin/seekablepipe qmail-local -- \
|
||||||
"$USER" "$HOME" "$LOCAL" "${EXTENSION:+-}" "$EXTENSION"
|
"$USER" "$HOME" "$LOCAL" "${EXTENSION:+-}" "$EXTENSION" "$DOMAIN" "$SENDER" ./Maildir/
|
||||||
"$DOMAIN""$SENDER" ./Maildir/
|
|
||||||
e=$?
|
e=$?
|
||||||
(($e == 111)) && exit 75
|
(($e == 111)) && exit 75
|
||||||
(($e == 100)) && exit 77
|
(($e == 100)) && exit 77
|
||||||
|
@ -1,6 +1,9 @@
|
|||||||
[Service]
|
[Service]
|
||||||
ExecStartPre=-/usr/sbin/postmap /etc/postfix/virtual
|
|
||||||
ExecStartPre=/sbin/e-smith/service-status postfix
|
ExecStartPre=/sbin/e-smith/service-status postfix
|
||||||
|
ExecStartPre=/sbin/e-smith/systemd/postfix-pre
|
||||||
|
ExecReload=
|
||||||
|
ExecReload=/sbin/e-smith/systemd/postfix-reload
|
||||||
|
SyslogIdentifier=postfix
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=sme-server.target
|
WantedBy=sme-server.target
|
||||||
|
7
root/usr/local/bin/seekablepipe
Normal file
7
root/usr/local/bin/seekablepipe
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
set -e
|
||||||
|
tmp=/var/tmp/seekable.$$
|
||||||
|
exec 3<&0 4<&1 >$tmp <$tmp
|
||||||
|
rm $tmp
|
||||||
|
cat <&3
|
||||||
|
exec ${1+"$@"} 1<&4 3>&- 4>&-
|
@ -1,6 +1,6 @@
|
|||||||
%define name smeserver-postfix
|
%define name smeserver-postfix
|
||||||
%define version 1.0
|
%define version 1.0
|
||||||
%define release 3
|
%define release 11
|
||||||
Summary: This is what smeserver-postfix does.
|
Summary: This is what smeserver-postfix does.
|
||||||
Name: %{name}
|
Name: %{name}
|
||||||
Version: %{version}
|
Version: %{version}
|
||||||
@ -17,12 +17,33 @@ Requires: postfix
|
|||||||
Requires: postfix-perl-scripts
|
Requires: postfix-perl-scripts
|
||||||
Requires: postfix-pcre
|
Requires: postfix-pcre
|
||||||
Requires: zsh
|
Requires: zsh
|
||||||
|
Requires: smeserver-mini-qmail
|
||||||
AutoReqProv: no
|
AutoReqProv: no
|
||||||
|
|
||||||
%description
|
%description
|
||||||
Koozali SME Server wrapper to configure postfix
|
Koozali SME Server wrapper to configure postfix
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Jan 08 2025 Brian Read <brianr@koozali.org> 1.0-11.sme
|
||||||
|
- reload-or-restart postfix after pseudonym change [SME: 12863]
|
||||||
|
|
||||||
|
* Sun Dec 29 2024 Brian Read <brianr@koozali.org> 1.0-10.sme
|
||||||
|
- Quotes round smtp-auth-proxy in templates for main.cf and sasl-passwd [SME: 12836]
|
||||||
|
|
||||||
|
* Mon Dec 23 2024 Jean-Philippe Pialasse <jpp@koozali.org> 1.0-9.sme
|
||||||
|
- fix virtual expected format: key whitespace value for empty group [SME: 12834]
|
||||||
|
|
||||||
|
* Fri Dec 20 2024 Jean-Philippe Pialasse <jpp@koozali.org> 1.0-8.sme
|
||||||
|
- fix catch-all behaviour [SME: 12382]
|
||||||
|
myorigin now is hostname
|
||||||
|
in case email sent outside by deamon generic rewrite occurs
|
||||||
|
|
||||||
|
* Sun Dec 15 2024 Jean-Philippe Pialasse <jpp@koozali.org> 1.0-6.sme
|
||||||
|
- add mini-qmail as Message delivery agent [SME: 12737]
|
||||||
|
few other fixes; +x on needed executable files
|
||||||
|
migrate old qmail properties used in postfix
|
||||||
|
catch all non existing recipient / check BCC working
|
||||||
|
|
||||||
* Tue Nov 19 2024 Jean-Philippe Pialasse <jpp@koozali.org> 1.0-3.sme
|
* Tue Nov 19 2024 Jean-Philippe Pialasse <jpp@koozali.org> 1.0-3.sme
|
||||||
- add requirements [SME: 12737]
|
- add requirements [SME: 12737]
|
||||||
- add conf-postfix
|
- add conf-postfix
|
||||||
@ -57,10 +78,10 @@ rm -f %{name}-%{version}-filelist
|
|||||||
/sbin/e-smith/genfilelist $RPM_BUILD_ROOT \
|
/sbin/e-smith/genfilelist $RPM_BUILD_ROOT \
|
||||||
--file /sbin/e-smith/systemd/postfix-reload 'attr(750,root,root)' \
|
--file /sbin/e-smith/systemd/postfix-reload 'attr(750,root,root)' \
|
||||||
--file /sbin/e-smith/systemd/postfix-pre 'attr(750,root,root)' \
|
--file /sbin/e-smith/systemd/postfix-pre 'attr(750,root,root)' \
|
||||||
|
--file /usr/bin/dotqmail 'attr(0555,root,root)' \
|
||||||
|
--file /usr/bin/postqmail-local 'attr(0555,root,root)' \
|
||||||
|
--file /usr/local/bin/seekablepipe 'attr(0555,root,root)' \
|
||||||
> %{name}-%{version}-filelist
|
> %{name}-%{version}-filelist
|
||||||
#echo "%doc COPYING" >> %{name}-%{version}-filelist
|
|
||||||
#--dir <dir> 'attr(755,user,grp)' \
|
|
||||||
#--file <file> 'attr(755,root,root)' \
|
|
||||||
|
|
||||||
%clean
|
%clean
|
||||||
cd ..
|
cd ..
|
||||||
|
Loading…
x
Reference in New Issue
Block a user