1

Topic: Problem with mail from CLI

==== Provide required information to help troubleshoot and get quick answer ====
- iRedMail version: Latest
- Linux/BSD distribution name and version: CentOS 5.6
- Any related log? Log is helpful for troubleshooting.
====

I'm trying to use the cli command mail to send mail from my cron script to my main email.  Normally this would work fine, but my main server domain's email is not hosted on the server, it's hosted on google apps.  All other domains on the server are hosted there.  So when I send an email using mail to an email at my main domain I get the error in the log file user doesn't exist.  Shouldn't dovecot and postfix check the MX records before they check their local user store?  How do I stop this and get it to use the MX records and send to Google?  If I send from a PHP script it works just fine, but not from mail in CLI.

----

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

2

Re: Problem with mail from CLI

jfreak53 wrote:

when I send an email using mail to an email at my main domain I get the error in the log file user doesn't exist.

Please post original log content instead.

jfreak53 wrote:

Shouldn't dovecot and postfix check the MX records before they check their local user store? How do I stop this and get it to use the MX records and send to Google?

Postfix will check local domains/users first. Maybe you can try 'sendmail' command or use your PHP script instead.

3

Re: Problem with mail from CLI

Actually, it's working now.  All I had to do was delete the main domain in iredadmin, all works now.  All other domain's are working and my admin account is also working, so all good.  Those that are looking in the future, just erase the domain in iredadmin, even if it is the main domain.  Thanks.