IMAP Only Send

Use this forum if you have problems with a hMailServer script, such as hMailServer WebAdmin or code in an event handler.
Post Reply
LiquiDev
New user
New user
Posts: 3
Joined: 2013-02-28 18:47

IMAP Only Send

Post by LiquiDev » 2013-02-28 19:09

hMail Server 5.3.3 B1879.

Hi All,

I have a question regarding IMAP only client (SMTP not configured on the client) and the VBScript hooks/events. In this situation, it seems that the OnAcceptMessage, OnDeliveryStart and OnDeliverMessage events don't get fired. I have tested this by simply logging the function as it is called, and there aren't any log entries for mail sent using IMAP. If I, however, send email via SMTP, the events get fired as expected.

This isn't a problem for me, as such, as I will be using IMAP in conjunction with SMTP, but I just thought I would ask the question. Is this how it was intended to work? or is it a fault?

More Info:
Mail Server: hMail Server 5.3.3 B1879
Mail Client: Roundcube (whatever the current version is as I am typing this *shruggs*. I would find out, but I don't think it is relevant).

Thanks in advance.

User avatar
mattg
Moderator
Moderator
Posts: 19810
Joined: 2007-06-14 05:12
Location: 'The Outback' Australia

Re: IMAP Only Send

Post by mattg » 2013-03-01 13:17

LiquiDev wrote:Is this how it was intended to work?
Yes

SMTP is intended for deliver to and between mailservers
IMAP is a protocol to read and store messages on a server.

IMAP is NOT designed to send mail destined for another server, or even another account on the same server
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

LiquiDev
New user
New user
Posts: 3
Joined: 2013-02-28 18:47

Re: IMAP Only Send

Post by LiquiDev » 2013-03-01 14:48

Thanks for the reply. This is the response I was expecting. I have a followup question...

At this point it is purely out of interest, as it isn't causing me any problems.

Even though IMAP is not designed for sending email, does hMailServer do this anyway? - meaning, if an email is placed in the ?outbox/sent items?, with a particular status, will hMailServer attempt to send it anyway. Even though it hasn't been received via SMTP? The reason I ask, is that even though I had not configured SMTP on the client (roundcube), the email still got routed to its recipient (not on the same domain, and not managed by hMailServer).

What I don't know, is if roundcube inferred that the SMTP server is on the same host as the IMAP server. Having said that, the events didn't get fired until I eventually configured roundcube for SMTP mail.

Again, thanks in advance.

User avatar
mattg
Moderator
Moderator
Posts: 19810
Joined: 2007-06-14 05:12
Location: 'The Outback' Australia

Re: IMAP Only Send

Post by mattg » 2013-03-01 16:14

LiquiDev wrote:Even though IMAP is not designed for sending email, does hMailServer do this anyway? - meaning, if an email is placed in the ?outbox/sent items?, with a particular status, will hMailServer attempt to send it anyway.
No

hMailserver doesn't recognise 'Outbox' or 'Sent Items' as anything other than names of folders.
The ONLY folder that hMailserver treats as special is 'inbox', and all incoming mail is delivered to an 'inbox' for each account. there are NO OTHER folders created by hMailserver, all of the others are created by the mail client, and seen as storage locations for mail by hMailserver
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

User avatar
dzekas
Senior user
Senior user
Posts: 2486
Joined: 2005-10-13 21:28
Location: Lithuania

Re: IMAP Only Send

Post by dzekas » 2013-03-01 20:26

LiquiDev wrote:Even though IMAP is not designed for sending email, does hMailServer do this anyway? - meaning, if an email is placed in the ?outbox/sent items?, with a particular status, will hMailServer attempt to send it anyway.
No. It is non-standard IMAP feature supported only by some IMAP servers.

Your IMAP clients simulate this 'Sent mail' -> 'Outbox' -> 'Sent Items' trail by using some internal store and SMTP delivery combined with saving to IMAP 'Sent Items' folder.

LiquiDev
New user
New user
Posts: 3
Joined: 2013-02-28 18:47

Re: IMAP Only Send

Post by LiquiDev » 2013-03-01 23:25

Thanks guys, I really appreciate the insight.

I have to say, I love how extensible this mail server is. I originally turned to it to solve a problem, that seems to be oversight with some other mail servers, not being able to stop specific users or domain from sending mail (receive only). But this allows me to do all sorts of funky stuff.

Post Reply