[imp] The message was rejected by the server

Andy Dorman adorman at ironicdesign.com
Tue May 12 16:18:36 UTC 2015


On 05/12/2015 10:50 AM, Simon B wrote:
> On 11 May 2015 17:08, "Michael J Rubinsky" <mrubinsk at horde.org> wrote:
>>
>>
>> Quoting Simon B <simon.buongiorno at gmail.com>:
>>
>>> LO
>>> On 11 May 2015 15:40, "Michael J Rubinsky" <mrubinsk at horde.org> wrote:
>>>>
>>>>
>>>>
>>>> Quoting Simon B <simon.buongiorno at gmail.com>:
>>>>
>>>>> On 27 Apr 2015 06:57, "Michael J Rubinsky" <mrubinsk at horde.org> wrote:
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> Quoting Simon B <simon.buongiorno at gmail.com>:
>>>>>>
>>>>>>> Hi
>>>>>>>
>>>>>>> I got a new iPhone 5s running iOS 8.1.3
>>>>>>>
>>>>>>> ActiveSync is working. Mails arrive and disappear as you'd expect.
>>>>>>> Calendar, and contacts too..
>>>>>>>
>>>>>>> The only thing not working is I can't send mails.  I get the error:
> The
>>>>>>> message was rejected by the server.
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> This is probably coming directly from the MTA.
>>>>>>
>>>>>>
>>>>>>>
>>>>>>> It's working from my Android device.
>>>>>>>
>>>>>>> SSL is turned on (and worked previously on my iPhone 4.  The only
>>>
>>> thing I
>>>>>>>
>>>>>>> can think of is that the iPhone doesn't like the server's self-signed
>>>>>>> certificate (but that's not what the error is saying...
>>>>>>>
>>>>>>> Any ideas? Known issue?
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> No. I can send mail fine on all of my iOS devices, including a 8.1.3
>>>>>
>>>>>
>>>>> iPhone. Try checking the ActiveSync log for a properly formatted email
>>>>> being sent - you might have to enable the verbose logging. You can
> post,
>>>
>>> or
>>>>>
>>>>> send the log to me directly if you like.  If the log doesn't show
>>>
>>> anything
>>>>>
>>>>> special, and the SMTP server log doesn't show anything useful, you may
>>>
>>> have
>>>>>
>>>>> to wireshark the Client -> Horde conversation while sending the email
> to
>>>>> see exactly what is being sent.
>>>>>
>>>>> Hi Michael
>>>>>
>>>>> Sorry, for the delay, I had access issues.
>>>>>
>>>>> Here are the log snippets..
>>>>> iOS
>>>>> May 11 10:38:16 mail postfix/submission/smtpd[18861]: connect from
>>>>> localhost[127.0.0.1]
>>>>> May 11 10:38:16 mail postfix/submission/smtpd[18861]: Anonymous TLS
>>>>> connection
>>>>> established from localhost[127.0.0.1]: TLSv1 with cipher
>>>>> ECDHE-RSA-AES256-SHA
>>>>> (256/256 bits)
>>>>> May 11 10:38:16 mail postfix/submission/smtpd[18861]: NOQUEUE: reject:
>>>
>>> RCPT
>>>>>
>>>>> from localhost[127.0.0.1]: 550 5.7.1 <MStrawn <
>>>
>>> MStrawn at recipientserver.net>@
>>>>>
>>>>> <MStrawn at recipientserver.net>recipientserver.net
>>>>> <MStrawn at recipientserver.net>>: Recipient
>>>>> address rejected: Access denied; from=<simon@ <simon at myserver.net>
>>>>> myserver.net<simon at myserver.net>>
>>>>> to=<MStrawn <MStrawn at recipientserver.net>@ <MStrawn at recipientserver.net
>>
>>>>> recipientserver.net<MStrawn at recipientserver.net>> proto=ESMTP helo=<
>>>>>
>>>>> mail.mymailserver.net>
>>>>> May 11 10:38:16 mail postfix/submission/smtpd[18861]: disconnect from
>>>>> localhost[127.0.0.1]
>>>>>
>>>>> Android
>>>>> May 11 10:42:19 mail postfix/submission/smtpd[18973]: connect from
>>>>> localhost[127.0.0.1]
>>>>> May 11 10:42:19 mail postfix/submission/smtpd[18973]: Anonymous TLS
>>>>> connection
>>>>> established from localhost[127.0.0.1]: TLSv1 with cipher
>>>>> ECDHE-RSA-AES256-SHA
>>>>> (256/256 bits)
>>>>> May 11 10:42:19 mail postfix/submission/smtpd[18973]: 3llf3H2PLlz1qy16:
>>>>> client=localhost[127.0.0.1], sasl_method=PLAIN,
>>>>> sasl_username=simon@ <simon at myserver.net>myserver.net<
> simon at myserver.net>
>>>>>
>>>>> May 11 10:42:20 mail postfix/cleanup[18976]: 3llf3H2PLlz1qy16:
>>>>> message-id=<3llf3H2PLlz1qy16@ <3llf3H2PLlz1qy16 at mail.mymailserver.net>
>>>>> mail.mymailserver.net<3llf3H2PLlz1qy16 at mail.mymailserver.net>>
>>>>>
>>>>> May 11 10:42:20 mail postfix/qmgr[8947]: 3llf3H2PLlz1qy16:
>>>>> from=<simon@ <simon at myserver.net>myserver.net<simon at myserver.net>>,
>>>>>
>>>>> size=589, nrcpt=1 (queue active)
>>>>> May 11 10:42:20 mail postfix/submission/smtpd[18973]: disconnect from
>>>>> localhost[127.0.0.1]
>>>>>
>>>>> It beats me why the MTA suddenly sees submission attempts as local
>>>>> delivery..!?  Nothing has changed in the postfix configuration for at
>>>
>>> least
>>>>>
>>>>> a year.  And my iPhone 4 was working reliably until I got the iPhone
> 5s..
>>>>>
>>>>> Any suggestions?
>>>>
>>>>
>>>>
>>>> Are these the same email? Is the Android log from an ActiveSync client
> or
>>>
>>> just a "normal" email client on the device?
>>>>
>>>>
>>>> I have no idea why this would happen for one ActiveSync client vs a
>>>
>>> different one, the SENDMAIL ActiveSync command is fairly straight forward
>>> and doesn't differ for different clients. Essentially we do some sanity
>>> checks and (at least for new mails, not replies) just sent the email
>>> through Horde's configured SMTP mailer.  I'd probably need a detailed
>>> ActiveSync log of the SENDMAIL command from the iOS device to see what it
>>> is sending to rule out (or fix) anything in our code.
>>>
>>> Just the normal ActiveSync log, or do I have to increase the debug level?
>>>
>>> Actually, I found something.
>>>
>>> On the same server, I have the MTA, production horde, and separately
> horde
>>> installed from git.
>>>
>>> The Android was actually using the production horde.
>>>
>>> When I changed the iOS device from git to production, it works.
>>>
>>> When I changed the android to point to the git install, it doesn't.
>>>
>>> PROD
>>> Address Book (turba) 4.1.3        SQL DB schema is ready.    Application
> is
>>> ready.
>>> Calendar (kronolith) 4.1.4        SQL DB schema is ready.    Application
> is
>>> ready.
>>> content 2.0.3                    SQL DB schema is ready.
>>> Filters Filters (ingo) 3.1.3    SQL DB schema is ready.    Application is
>>> ready.
>>> Horde (horde) 5.1.5                                        Application is
>>> ready.
>>> Mail (imp) 6.1.6                SQL DB schema is ready.    Application is
>>> ready.
>>> Notes (mnemo) 4.1.2                SQL DB schema is ready.    Application
>>> is ready.
>>> Password (passwd) 5.0.1                                    Application is
>>> ready.
>>> Tasks (nag) 4.1.3                SQL DB schema is ready.    Application
> is
>>> ready.
>>> timeobjects 2.0.4
>>>
>>> GIT
>>> Address Book (turba) 4.3.0-git    SQL DB schema is ready.    Application
> is
>>> ready.
>>> Calendar (kronolith) 4.3.0-git    SQL DB schema is ready.    Application
> is
>>> ready.
>>> content 2.0.5-git                SQL DB schema is ready.
>>> Filters (ingo) 3.3.0-git        SQL DB schema is ready.    Application is
>>> ready.
>>> Horde (horde) 5.3.0-git                                    Application is
>>> ready.
>>> Mail (imp) 7.0.0-git             SQL DB schema is ready.    Application
> is
>>> ready.
>>> Notes (mnemo) 4.3.0-git         SQL DB schema is ready.    Application is
>>> ready.
>>> Password (passwd) 5.0.2-git                             Application is
>>> ready.
>>> Tasks (nag) 4.3.0-git             SQL DB schema is ready.    Application
> is
>>> ready.
>>> Tickets (whups) 3.0.1-git
>>>
>>> I suspect something has (or more accurately should have) changed in
>>> backends.local.php
>>>
>>> Anything I should look for specifically?  I usually end up breaking
>>> something in there..
>>>
>>> Simon
>>
>>
>> Nothing comes to mind, other than making sure the "Mailer" config for
> horde (in conf.php) and/or IMP (in backends.[local.]php) - depending on
> which you are using - is correct. Make sure you are using a SMTP server,
> and not the sendmail binary.
>
> Can I just clarify the backends.local.php should only contain overrides?
> Mine has the complete mailer in it.
>
> I'm definitely not using conf.php or a sendmail binary.
>
> Would it be possible for you or someone to share their backends.local.php
> with me for comparison?  Please?
>
> Simon
>

Our backends.local.php (below) configures all our IMAP servers (each 
user's mail is on one of the IMAP servers which is selected when they 
log in) and leaves the smtp settings blank.  This way we will use the 
Horde SMTP settings which use the Horde auth username & pwd (as 
described in the backends.php comments) which point to our outbound smtp 
spam/virus filter service.

<?php
$servers ['imap']['disabled'] = true;
$serverNames = array('ariel.ironicdesign.com', 
'beatrice.ironicdesign.com', 'cordelia.ironicdesign.com', 
'dorcas.ironicdesign.com', 'emelia.ironicdesign.com', 
'francisca.ironicdesign.com', 'isabella.ironicdesign.com', 
'juliet.ironicdesign.com', 'kate.ironicdesign.com', 
'luce.ironicdesign.com', 'nerissa.ironicdesign.com', 
'ophelia.ironicdesign.com', 'portia.ironicdesign.com', 
'quickly.ironicdesign.com', 'rosalind.ironicdesign.com', 
'yorick.ironicdesign.com');
foreach($serverNames as $name) {

   $servers [$name] = array (
     'disabled' => false,
     'name' => 'FanMailPlus IMAP',
     'hostspec' => $name,
     'hordeauth' => 'full',
     'protocol' => 'imap',
     'port' => 143,
     'secure' => 'tls',
     'maildomain' => '',
     'smtp' => array(
     //    'auth' => true,
     //    'debug' => false,
     //    'horde_auth' => false,
     //    'host' => 'smtp.example.com',
     //    'lmtp' => false,
     //    'localhost' => 'localhost',
     //    'password' => null,
     //    /* Mail from a MUA SHOULD be sent via the mail submission 
port (587)
     //     * rather than the MTA port (25). (See RFC 6409/STD 72).
     //     * Note that mail submission REQUIRES some method of 
authentication
     //     * (whether explicit user/password credentials or configuring the
     //     * mail submission agent to automatically authenticate this host
     //     * based on the network location). */
     //    'port' => 587,
     //    'username' => null
     ),
     'spam' => array(
       'innocent' => array(
         'null' => true,
         'program' => null
       ),
       'spam' => array(
         'display' => false,
         'email' => 'junk at antespam.com',
         'email_format' => 'redirect',
         'null' => true,
         'program' => null
       )
     ),
     'admin' => array(
     //     'user' => 'cyrus',
     //     'password' => 'cyrus_pass',
     //     'userhierarchy' => 'user.'
     ),
     'acl' => true,
     'cache' => false,
     // uncomment these lines to enable detailed, really, really 
detailed, IMAP logging
     // 'debug' => '/tmp/.horde/imp/imap.log',
     // 'debug_raw' => true,
     'quota' => array(
         'driver' => 'imap',
         'params' => array(
             'hide_when_unlimited' => true,
             'unit' => 'MB'
         )
     ),
     'special_mboxes' => array(
          IMP_Mailbox::MBOX_DRAFTS => 'Drafts',
          IMP_Mailbox::MBOX_SENT => 'Sent',
          IMP_Mailbox::MBOX_SPAM => 'Spam',
          IMP_Mailbox::MBOX_TEMPLATES => 'Templates',
          IMP_Mailbox::MBOX_TRASH => 'Trash',
     ),
     'autocreate_special' => true,
   );
}


-- 
Andy Dorman



More information about the imp mailing list