winmasta
(Winmasta)
November 16, 2016, 1:12am
1
I searched everywhere but cant find why freepbx send mails from ‘[email protected] ’
cat /etc/hosts
127.0.0.1 asterisk.kireva.com localhost localhost.localdomain localhost4
::1 asterisk.kireva.com localhost localhost6
postconf -n
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
debug_peer_level = 2
html_directory = no
inet_interfaces = localhost
inet_protocols = all
mail_owner = postfix
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
mydestination = $myhostname, localhost.$mydomain, localhost
mydomain = asterisk.kireva.com
myhostname = asterisk.kireva.com
myorigin = asterisk.kireva.com
newaliases_path = /usr/bin/newaliases.postfix
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix-2.6.6/README_FILES
sample_directory = /usr/share/doc/postfix-2.6.6/samples
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options =
unknown_local_recipient_reject_code = 550
Marbled
(Nicolas Riendeau)
November 16, 2016, 1:31am
2
Hi!
Notification settings contains some email addresses (at least with System Admin Pro).
I think this is the first thing I would check…
Your Postfix configuration seems A-OK…
Good luck and have a nice day!
Nick
winmasta
(Winmasta)
November 16, 2016, 1:34am
3
I do not have system admin pro because it is commercial, I am shure there is a way to fix it by editing some config files or sql database
Marbled
(Nicolas Riendeau)
November 16, 2016, 1:50am
4
Hi!
What does the System Admin has as far as notification options, email setup?
I doubt that there is no way to fix it short of hacking files…
If worst comes to worst you could fix it with Postfix’s canonical maps if I am not mistakend…
Good luck and have a nice day!
Nick
winmasta
(Winmasta)
November 16, 2016, 2:09am
5
It has FROM ADDRESS but
Enter a from email All emails sent from this machine (unless overridden elsewhere) will come from this email address.
and there is [email protected] in there.
winmasta
(Winmasta)
November 16, 2016, 2:10am
6
And there is email address in maillog, which I cant find anywhere in settings [email protected]
winmasta
(Winmasta)
November 16, 2016, 2:11am
7
here is the piece of maillog
Nov 16 08:39:37 asterisk postfix/qmgr[1474]: D5BCE83022: from=<[email protected] >, size=983, nrcpt=1 (queue active)
Nov 16 08:39:37 asterisk postfix/smtp[25242]: connect to kireva.com [195.208.161.176]:25: Connection refused
Nov 16 08:39:37 asterisk postfix/smtp[25242]: D5BCE83022: to=[email protected] , relay=none, delay=121820, delays=121820/0.02/0/0, dsn=4.4.1, status=deferred (connect to kireva.com [195.208.161.176]:25: Connection refused)
Nov 16 08:44:37 asterisk postfix/qmgr[1474]: 252E483024: from=[email protected] , size=1690, nrcpt=1 (queue active)
Nov 16 08:44:38 asterisk postfix/smtp[25503]: connect to gmail-smtp-in.l.google.com [2a00:1450:4010:c0f::1b]:25: Network is unreachable
Nov 16 08:44:38 asterisk postfix/smtp[25503]: connect to gmail-smtp-in.l.google.com [64.233.162.27]:25: Connection refused
Nov 16 08:44:38 asterisk postfix/smtp[25503]: connect to alt1.gmail-smtp-in.l.google.com [2404:6800:4008:c05::1b]:25: Network is unreachable
Nov 16 08:44:38 asterisk postfix/smtp[25503]: connect to alt1.gmail-smtp-in.l.google.com [64.233.187.27]:25: Connection refused
Nov 16 08:44:38 asterisk postfix/smtp[25503]: connect to alt2.gmail-smtp-in.l.google.com [2607:f8b0:400e:c04::1a]:25: Network is unreachable
Nov 16 08:44:38 asterisk postfix/smtp[25503]: 252E483024: to=[email protected] , relay=none, delay=117823, delays=117823/0.03/0.77/0, dsn=4.4.1, status=deferred (connect to alt2.gmail-smtp-in.l.google.com [2607:f8b0:400e:c04::1a]:25: Network is unreachable)
Marbled
(Nicolas Riendeau)
November 16, 2016, 2:21am
8
Euh, it sounds more like your main problem is that port 25 is not accessible from your PBX…
Your box also seems to want to speak IPv6, is it functional at your site?
Good luck and have a nice day!
Nick
PS: Have you tried looking into those emails to see what they contain? IIRC it’s something like postcat /var/spool/postfix/deferred/…/THE_QUEUE_ID?
Marbled
(Nicolas Riendeau)
November 16, 2016, 2:31am
9
Maybe these are the Upgrade Notifications from Module Admin?
Click on the frog on the top right corner of the screen in module admin…
winmasta
(Winmasta)
November 16, 2016, 2:39am
10
In module admin
Email - [email protected]
Machine ID - asterisk
winmasta
(Winmasta)
November 16, 2016, 2:44am
11
I don’t have any ipv6, how can I disable it completely ?
emails looks like from backup module
[[email protected] 2]# cat 252E483024
CO 1690 171 1 0 1690T1479142854 [email protected] eva.comMN=Received: by localhost.localdomain (Postfix, from userid 500)N6 id 252E483024; Tue, 15 Nov 2016 00:00:54 +0700 (KRAT)NTo: [email protected] : =?utf-8?Q?Backup_Log:VoIP_Server-November_15,_2016,_12:00_am-Default_bac?= =?utf-8?Q?kup?=N’X-PHP-Originating-Script: 500:Email.phpNFrom: [email protected] N3Reply-To: "[email protected] " [email protected] NX-Sender: [email protected] : CodeIgniterNX-Priority: 3 (Normal)N&Message-ID: [email protected] NMime-Version: 1.0N=Content-Type: multipart/mixed; boundary="B_ATC_5829edc362587"N,Date: Tue, 15 Nov 2016 00:00:54 +0700 (KRAT)NN,This is a multi-part message in MIME format.N3Your email application may not support this format.NN–B_ATC_5829edc362587N’Content-Type: text/plain; charset=utf-8NContent-Transfer-Encoding: 8bitNNBACKUP LOG ATTACHEDNNN–B_ATC_5829edc362587N+Content-type: text/plain; name=“backup.log"N Content-Disposition: attachment;N!Content-Transfer-Encoding: base64NNMTm92ZW1iZXIgM[email protected] [email protected] [[email protected] 2]# cd …
[[email protected] deferred]# cd D
[[email protected] D]# ls
D5BCE83022 D6CE883002
[[email protected] D]# cat D6CE883002
CO 1690 171 1 0 1690T1478883674 [email protected] eva.comMN=Received: by localhost.localdomain (Postfix, from userid 500)N6 id D6CE883002; Sat, 12 Nov 2016 00:01:14 +0700 (KRAT)NTo: [email protected] : =?utf-8?Q?Backup_Log:VoIP_Server-November_12,_2016,_12:01_am-Default_bac?= =?utf-8?Q?kup?=N’X-PHP-Originating-Script: 500:Email.phpNFrom: [email protected] N3Reply-To: "[email protected] ” [email protected] NX-Sender: [email protected] : CodeIgniterNX-Priority: 3 (Normal)N&Message-ID: [email protected] NMime-Version: 1.0N=Content-Type: multipart/mixed; boundary="B_ATC_5825f955e0c54"N,Date: Sat, 12 Nov 2016 00:01:14 +0700 (KRAT)NN,This is a multi-part message in MIME format.N3Your email application may not support this format.NN–B_ATC_5825f955e0c54N’Content-Type: text/plain; charset=utf-8NContent-Transfer-Encoding: 8bitNNBACKUP LOG ATTACHEDNNN–B_ATC_5825f955e0c54N+Content-type: text/plain; name="backup.log"N Content-Disposition: attachment;N!Content-Transfer-Encoding: base64NNMTm92ZW1iZXIgM[email protected] [email protected] [[email protected] D]#
but in backup module Status email - [email protected]
Marbled
(Nicolas Riendeau)
November 16, 2016, 3:25am
12
Euh, postcat not cat…
In the backup, check if you defined an “Internal mail server (server)” as a backup destination and if so to which address the backup is sent…
For IPv6 if you have the FreePBX distro that’s actually Centos so you could most likely follow this: http://www.networkinghowtos.com/howto/disable-ipv6-on-centos/ .
By the way, there is a typo in your asterisk email address *aserisk"…
Good luck and have a nice day
Nick
PS: Any idea why port 25 can’t seem to be accessible from your PBX? Firewall problems?
dicko
(dicko)
November 16, 2016, 4:05am
13
Google will NOT relay mail sent to port 25, that is why you get the “refused”, don’t sweat the ipv6 either.
You will need to configure gmail relaying by postfix using one of the many recipes out there.
Marbled
(Nicolas Riendeau)
November 16, 2016, 4:10am
14
Hi dicko!
I don’t think he is trying to relay through them…
His system is trying to send an email to a gmail address, this is one of their MX (Mail eXchanger).
re:
; <<>> DiG <<>> gmail.com . mx
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 51187
;; flags: qr rd ra; QUERY: 1, ANSWER: 5, AUTHORITY: 4, ADDITIONAL: 0
;; QUESTION SECTION:
;gmail.com . IN MX
;; ANSWER SECTION:
gmail.com . 3600 IN MX 5 gmail-smtp-in.l.google.com .
gmail.com . 3600 IN MX 10 alt1.gmail-smtp-in.l.google.com .
gmail.com . 3600 IN MX 20 alt2.gmail-smtp-in.l.google.com .
gmail.com . 3600 IN MX 30 alt3.gmail-smtp-in.l.google.com .
gmail.com . 3600 IN MX 40 alt4.gmail-smtp-in.l.google.com .
;; AUTHORITY SECTION:
gmail.com . 133693 IN NS ns3.google.com .
gmail.com . 133693 IN NS ns4.google.com .
gmail.com . 133693 IN NS ns1.google.com .
gmail.com . 133693 IN NS ns2.google.com .
;; Query time: 51 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Tue Nov 15 23:07:16 2016
;; MSG SIZE rcvd: 222
What he posted looks a little too much like gibberish because he used “cat” instead of “postcat” but it looks like it’s the backup log and not the actual backup itself (at least that’s what the “Subject” header seems to contain…)…
Have a nice day,
Nick
winmasta
(Winmasta)
November 16, 2016, 11:19am
15
Didnt know about postcat, thanks
There is no Internal mail server in Backup servers
Thanks for showing typo, it was in freepbx Advanced settings - Backup module - Email from address, so it is exactly backup module who trying to send all these emails
Thanks for ipv6 link
Still cant understand, where is “localhost.localdomain” and "[email protected] " may in config files. May be somewhere in mysql base “asterisk” ?
winmasta
(Winmasta)
November 16, 2016, 11:27am
17
connect to kireva.com[195.208.161.176]:25: Connection refused
This is my mail server (kireva.com ) but I use 587 port for smtp.
By the way I set 1 daily backup, why there is so many email trying ?
I comment
#smtp inet n - n - - smtpd
and uncomment
submission inet n - n - - smtpd
but emails still trying 25 port
cynjut
(Dave Burgess)
November 16, 2016, 3:32pm
18
Your domain should be kireva.com , not asterisk.
1 Like
Marbled
(Nicolas Riendeau)
November 16, 2016, 4:09pm
20
Port 587 is the submission port, it’s the port a program such as Thunderbird, Outlook, etc… would use to send emails…
It is not the port a MTA (mail server software such as Postfix) use to relay an email to another server… Port 25 is…
Don’t play with that on the PBX… These activate/deactivate Postfix services… When you comment/uncomment those you simply stop the mail server running on the PBX from running those services and answer to these ports…
You could specify a relayhost to force the Postfix running on the PBX to use port 587 but this is totally broken behavior***… The right solution would be to have the email server handling mail for kireva.com respond to port 25 for the PBX…
Good luck and have a nice day!
Nick
*** If you do that don’t tell Wietse Venema (the author of Postfix) that I even suggested this…