smtpd: Added support for gecos aliases
This commit is contained in:
parent
baf347204b
commit
4f22f69766
2 changed files with 55 additions and 8 deletions
10
smtpd/files/generate-smtpd-gecos.sh
Normal file
10
smtpd/files/generate-smtpd-gecos.sh
Normal file
|
@ -0,0 +1,10 @@
|
|||
#!/bin/sh
|
||||
|
||||
echo "# Generated" > /etc/mail/gecos
|
||||
|
||||
/usr/bin/awk -F : '{
|
||||
if($3 != "0" && $7 != "/sbin/nologin") {
|
||||
gsub(/[[:space:]]+/, ".", $5);
|
||||
print tolower($5)":"$1;
|
||||
}
|
||||
}' /etc/passwd >> /etc/mail/gecos
|
Loading…
Add table
Add a link
Reference in a new issue