[solved] Asterisk ignores servermail setting

solution:

used postfix settings:

masquerade_domains = MYDOMAIN.COM

Also, postfix was set to route through the local host. The remote facility admin was also contacted and asked to adjust firewall settings.


Asterisk seems to ignore the servermail setting, and sends mails with the format of:

asterisk@localhost.localdomain

I know that this may be done in sendmail and postfix, but asterisk apparently has a way.

Maybe you should change your hostname ?
localhost.localdomain does not convey much confidence in your technical abilities :smiley:

I am not familiar with the option, but it is much more likely that there would be one called servermail than one called severemail!

[quote=“thor”]Maybe you should change your hostname ?
localhost.localdomain does not convey much confidence in your technical abilities :smiley:[/quote]

The hostname of the computer is currently set.

Which smtpd have you set up ?

I think it may be a smtpd config issue, you need to allow domain rewriting

btw, it’s ‘serveremail’ NOT ‘servermail’

Regards

Where have you set the “servermail” settings?

Hi cuban_cigar!

I think this can be a postfix setting!

In my /etc/postfix/main.cf for postfix I have this:

In postconfig5 http://www.postfix.org/postconf.5.html you can read:

[code]masquerade_domains (default: empty)

Optional list of domains whose subdomain structure will be stripped off in email addresses.

The list is processed left to right, and processing stops at the first match. Thus,

    masquerade_domains = foo.example.com example.com

strips "user@any.thing.foo.example.com" to "user@foo.example.com", but strips "user@any.thing.else.example.com" to "user@example.com".

A domain name prefixed with ! means do not masquerade this domain or its subdomains. Thus,

    masquerade_domains = !foo.example.com example.com

does not change "user@any.thing.foo.example.com" or "user@foo.example.com", but strips "user@any.thing.else.example.com" to "user@example.com".

Note: with Postfix version 2.2, message header address masquerading happens only when message header address rewriting is enabled:

    The message is received with the Postfix sendmail(1) command,
    The message is received from a network client that matches $local_header_rewrite_clients,
    The message is received from the network, and the remote_header_rewrite_domain parameter specifies a non-empty value. 

To get the behavior before Postfix version 2.2, specify "local_header_rewrite_clients = static:all".

Example:

masquerade_domains = $mydomain[/code]

I hope this might help you!

Virtually yours // Nypon