jueves, 26 de octubre de 2023

Changing Local Domain Names to Internet Domain Names in Postfix Configuration

1) Edit the Postfix Configuration File:

nano /etc/postfix/main.cf

Paste the following lines at the end of the file:

smtp_generic_maps = hash:/etc/postfix/generic
relayhost = 192.168.55.11
myhostname = Freepbx26.viznitzny.com
mydomain = viznitzny.com
myorigin = freepbx26


2) Edit the Generic Mapping File:

nano /etc/postfix/generic

Add the following mappings at the top of the file:



root freepbx26@chvrm.com root@chvrm.local freepbx26@chvrm.com root@freepbx freepbx26@chvrm.com root@freepbx.chvrm.local freepbx26@chvrm.com asterisk freepbx26@chvrm.com asterisk@chvrm.local freepbx26@chvrm.com asterisk@freepbx26 freepbx26@chvrm.com asterisk@freepbx26.chvrm.local freepbx26@chvrm.com



3) Apply the Generic Mapping:

sudo postmap /etc/postfix/generic

sudo service postfix reload



4) Restart Postfix Service (If Needed):

sh
sudo service postfix restart


5) Test Email Sending:

echo "This is a test" | mail -s "Test 26" ambiorixg12@gmail.com

6) Check Postfix Logs:

sh
tail -f /var/log/maillog

No hay comentarios:

Publicar un comentario