1

Topic: local processes sending notification emails - emails rejected

In this case, it's cfengine... so, if something happens, cfengine uses localhost as its mail server and sends an email to the appropriate address. The from address is set to cfengine@fqdn.of.the.mail.server

However, postfix on the iredmail server is rejecting these mails with:


package postfix/smtpd[32398]: NOQUEUE: reject: RCPT from localhost[127.0.0.1]: 550 5.1.0 <cfengine@fqdn.of.mail.server>: Sender address rejected: User unknown in local recipient table; from=<cfengine@fqdn.of.mail.server> to=<destination@some.other.domain> proto=SMTP helo=<mail.server.fqdn>

The mail server is in a different domain that the domain for which it has the MX record (and perhaps if it was in the mail domain it would just work?).

So, I guess I need to add that address, cfengine@fqdn.of.mail.server as an authorized sending address in the postgresql db someplace, or in a postfix config file someplace? Suggestions/hints/solutions?

Thanks.

==== Provide required information ====
- iRedMail version and backend (LDAP/MySQL/PGSQL): 0.8.1 PGSQL
- Linux/BSD distribution name and version: RHEL6.3/64
====

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: local processes sending notification emails - emails rejected

- Is cfengine running on iRedMail server? iRedMail doesn't have cfengine.
- It says "from=<cfengine@fqdn.of.mail.server>", does system account "cfengine" exist?

3

Re: local processes sending notification emails - emails rejected

ZhangHuangbin wrote:

- Is cfengine running on iRedMail server? iRedMail doesn't have cfengine.
- It says "from=<cfengine@fqdn.of.mail.server>", does system account "cfengine" exist?

I run cfengine on my servers to push out configs, make sure processes are running/etc.

So, yes, cfengine is running on the iRedMail server.

There is no system account "cfengine" as cfengine runs as root... the cfengine email piece just sets the FROM to cfengine@fqdn not sure if I can change that.

4

Re: local processes sending notification emails - emails rejected

Try either one:

- Add system account "cfengine"
- Set the From: address an available user. e.g. root@[hostname], or a existing mail user.

5

Re: local processes sending notification emails - emails rejected

What about creating a virtual mailbox? Or would that not work because it's user@host.fqdn instead of user@email.domain ?

6

Re: local processes sending notification emails - emails rejected

The sender is "cfengine@[YOUR_SYSTEM_HOSTNAME]", so it should be a system account.

7

Re: local processes sending notification emails - emails rejected

After conversing with the folk in #postfix on freenode and reading through some postfix documentation, I found another way to do what I want to do.

Added a canonical name mapping.

So, in the postfix main.cf had to turn on canonical name mapping via the /etc/postfix/canonical db file and added a line to that mapping cfengine@HOSTNAME.FQDN to cfengine@EMAILDOMAIN which the sending email rules in main.cf then accepted.

Thanks!

8

Re: local processes sending notification emails - emails rejected

Thanks for your sharing. smile