Our Blog

Share

Configure SMTP in hMailServer

  • Connect to hMailServer Administrator
  • Expand Settings
  • Expand Protocols
  • Click on SMTP

General

Connections

  • Maximum number of simultaneous connections (0 for unlimited): You can use this to reduce simultaneous SMTP connection to hMailServer. Reducing this to required value may also help against DOS attacks.

Other

  • Welcome message: This is the SMTP banner message which hMailServer uses in response to SMTP client’s connection response. SMTP Client issues further commands only after receiving this banner.
  • Max message size (KB): hMailServer will reject messages larger than value specified here. Default value is 20MB. To set maximum message size to unlimited set it to zero.
Configure SMTP in hMailServer - General

Delivery of e-mail

Delivery of e-mail

  • Number of retries: This value determines that how many times hMailServer should attempt to deliver email before returning the delivery notification failure message. Failed messages are held in delivery queue. The default value is 4. If you enter 10 here hMailServer will 11 times to deliver email before giving up.
  • Minutes between every retry: This is the interval in minutes between each retry.
  • Local host name: This is the host name of the hMailServer. This host name must resolve to the IP Address where hMailServer is running. You may setup up to 15 host names, but remember each host name must resolve to IP address of hMailServer. The host name is very critical when you are setting up live SMTP server to directly deliver emails to the destination servers by resolving their MX records. When sending SMTP server connects to another SMTP server to deliver email, the sending server first introduces itself by this host name to the receiving server. Here receiving server may try to resolve this host name supplied by sending server to it’s IP address from where it has received connection request. If the resolved IP doesn’t match with the IP address of the sending server then it may drop the connection.

SMTP Relayer

By default if you do not configure SMTP relayer, hMailServer deliver emails directly to the destination servers by resolving their MX records. This is very useful and awesome feature while setting up live SMTP server. However in small setup where this kind of activity is not possible we can use SMTP relayer/smart host feature, so that hMailServer will deliver remote emails to this SMTP relayer which will then further deliver it to the destination servers. To configure SMTP relayer follow below steps:

  • Remote host name: This is the host name of the SMTP server where hMailServer will deliver all remote emails. This should never be set to localhost which will cause trouble. hMailServer will try to connect itself which will create endless loop.
  • Remote TCP/IP port: TCP/IP port of the SMTP relay server on which it listens.
  • Server requires authentication: Select if your SMTP relay server requires authentication.
    • User name: Specify username to authenticate with SMTP relay server.
    • Password: Specify password of username provided in previous step.
  • Use SSL: Select if SMTP relay server requires SSL connection.
Configure SMTP in hMailServer - Delivery of email

RFC Compliance

  • Allow plain text authentication: Enables plain text authentication if selected. Default is disabled.
  • Allow empty sender address: hMailServer will allow emails with empty sender address. This should be enabled because there are many emails like read receipt which are sent from empty sender address.
  • Allow incorrectly formatted line endings: Select to allow incorrectly formatted line endings. Generally spammers send incorrectly formatted emails but remember it may also be possible if there is any bug with SMTP client.
  • Disconnect client after too many invalid commands: If enabled instructs hMailServer to drop connection forcefully if client issues too many invalid commands.
    • Maximum number of invalid commands: Specifies number of invalid commands after which hMailServer will forcefully disconnect session with the client.
Configure SMTP in hMailServer - RFC Compliance

Advanced

Deliver of e-mail

  • Bind to local IP address: Specify which IP address should hMailServer use while connecting to remote SMTP servers, if you have multiple public IP addresses. If not specified, hMailServer will use Windows default
  • Maximum number of recipients in batch: SMTP servers may reject email from hMailServer if there are too many recipients for a single mail. If hMailServer finds more number of recipients than the value specified here in a single email, then hMailServer will deliver to number of recipients specified by this setting in a single delivery and then disconnect and will again reconnect and continue with the rest of recipients.

Other

  • Add Delivered-To header: If enabled hMailServer will add Delivered-To header in all outgoing emails. This will contain recipient address given in the SMTP envelope during SMTP communication.
  • Rule Loop limit: This will eliminate endless loops created due to global/user level rules.
Configure SMTP in hMailServer - Advanced
Share

Gopal Thorve

14 comments
rohit_k_it
rohit_k_it

Hi Gopal,


I am able to send email using SSL and unable to find any SSL related keyword in Email Header. Can you please help and confirm what could be the issue there.


Regards


Rohit

manishi
manishi

I have a requirement where i need to lock account after certain number of login attempts when a user uses email account to login via webmail .

As far as i understand i think we have something called "autoban" in hmailserver but i think this will lock the whole webmail even if one user does multiple failed login attempts.
I am not sure i understand the workaround for it.It talks about some priority etc but i don't think i can implement that for each email account.

any idea how i can accomplish my requirement. I don't see any flag or setting on each individual email accounts

any help regarding this is much appreciated.

muazzam
muazzam

Hi Gopal,

Yes I have understood which you have replyed in earlier post. but can we add multipal ids for relayining email in SMTP>> Delivery of Email tab.

currently only one id can be added in SMTP whcih u have mentioned in post.

Please elaborate more. or if posibile can i contact you. so if possible please provied your number.

muazzam
muazzam

Hi Gopal,

Thanks for your promte reply, but my query is can we rely mail from multipal ids through hmailserver.

Thx

muazzam
muazzam

Hi Gopal,

I have checked option which you have sent, below i have mentioned my requirement

1- I have one domain " example.com" and i have created one alias domain in hmailserver "test.example.com" >> right click on Domain >> add domain.

2- Created a email id " mozi@test.example.com" >> expanded domain name which i have created >> Right Click on Account >> add "mozi@test.example.com

3- Under settings i have added valid email address and password for the email authentication >>Settings >>Protocol >>SMTP >>Delivery of Email tab>> added email address & password.

4- configured outlook account with mozi@test.example.com and mentioned pop and smtp ip address where i have installed hmailserver.

5- When i send mail to my yahoo id mozi@yahoo.com and when i checked sender email id i found that valid email id which i have mentioned in point number 3


Requirements:

Now we are moving "example.com domain in Google Apps and we have Microsoft ERP server which is sent mail to individual to diffrent email id but my ERP server is not supportung SSL and Google is not rely mail with out SSL. that's why i have insatllaed Hmailserver in my network.

But in this case which i have explain in above i can able to sent mail from only one ID.

So can you help me how i can achieve this requirement in hmailserver..


muazzam
muazzam

Hi

One of our client is using Microsoft ERP server and they want to email trigger from ERP server and for this i have installed and configured HM server 5.3.3- B1879, and its working properly.

but when i sent mail to other email id its showing that id, which i have set in "server requires authentication" so is there a way add more than 2 email ids on hmailserver, so that users can send mail from individual ids.

Thx 

gopalthorve
gopalthorve moderator

@muazzam No we can't add there. First of all if you are hosting only one domain in hMailServer then according to me you don't required to configure multiple relay account.

In situations like you have multiple domains and want to relay each domain's email through different SMTP Relay server then SMTP Route might help (http://www.hmailserver.com/documentation/latest/?page=reference_route). I am not sure but I think it might help in such situations. I have never tested it.

If you want to contact me send you email ID through Contact Me page on my blog http://gopalthorve.com/contact-me/. I shall send you my mobile number.

gopalthorve
gopalthorve moderator

@muazzam yes we can.

create multiple users under the domain in hMailServer.

configure hMailServer for relaying emails using relay@example.com on SMTP >> Delivery of Email tab.

and follow the instructions that I sent you earlier 

gopalthorve
gopalthorve moderator

@muazzam Thanks for elaborating. What I understand from the issue now is that:

Say you configured relay@example.com in step no. 3, then when you are sending email from mozi@example.com using Outlook to your yahoo id then you receiving it from relay@example.com instead of mozi@example.com. Is that correct? If yes then, now you don't need to do anything in hMailServer. Just follow the instruction below:

1. Login to webmail of relay@example.com.

2. Click the Gear Icon just below you profile picture in GMail then click Settings.

3. Click "Accounts & Import"

4. Click "Add another email address you own"

5. A popup window will appear. Fill up the name and email address. In your case email address will be mozi@example.com

6. Click Next button

7. Select "Send through example.com SMTP Servers"

8. Enter smtp.gmail.com in SMTP Server field, username: mozi@example.com, password is your password of mozi@example.com. Select .465 in port field. Click Next button

9. Now you will receive a verification code on email address being added i.e. mozi@example.com

10. Verify the account by entering the code received.

That's all now you can send email from mozi@example.com from Outlook through hMailServer and now you will receive it from mozi@example.com.

Add all the accounts similarly which will be sending email from hMailServer using relay@example.com as relay account.

Hope this helps.

Do let me know if any issue.


MZabel
MZabel

@gopalthorve @muazzam 

How can I configure hMail so that it only accepts outbound email from 1 external IP address> thank you


Read more:
How to install Apache Server on Windows

Apache HTTP Server is the number web server in the world today. More than 65% web servers in the world...

Close