1

Topic: SMTP problem, can I direct insert the mail in database?

Hello guys!

I have a server in digitalocean that I facing a problem with SMTP, when I try to send a mail with PHP (a simply contact form) the server said that can't connect to SMTP.
Someone have said to me that digitalocean block smtp by default, so I have openned a ticket and they answer me that have none ports being blocked for my droplet (server).

SO, I don't realize how to solve this SMTP problem and I don't have too much time to wast now.
I want to jerry-rig for a temporary emergencial purpose doing a direct insert in my iredmail database, my mail host is the same host of the website with the contact form so the iredmail database is in the localhost, it's possible to do a "direct insert mail" in the iredmail database?
I just want to temporary fix that until I realize how to solve the smtp problem.

Cheers!

==== Required information ====
- iRedMail version: 0.8.4
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): mysql
- Linux/BSD distribution name and version: ubuntu 12.04 server x64
- Related log if you're reporting an issue:

"smtp error: could not connect to smtp host" ¬¬
====

----

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

2

Re: SMTP problem, can I direct insert the mail in database?

jacksonbenete wrote:

it's possible to do a "direct insert mail" in the iredmail database?

Yes. Or you can add mail user with iRedAdmin (either open source edition or iRedAdmin-Pro) if you have it installed: httpS://[your_server]/iredadmin/

If the error message is "can't connect to SMTP", it doesn't look like an issue related to mail account. I suggest you paste the full original error message here.

3

Re: SMTP problem, can I direct insert the mail in database?

Sorry Zhang, my English isn't good so I think you misunderstood my objective.
I don't want to insert a new mail account, this I can do with success through iRedAdmin.

I want to insert a email message like if I have "sent a mail" but directly in the database.
I don't know if the emails (the messages) are stored in database or in a directory, so I don't know how to do that.

Also, I'm trying to create a new iredmail server to delete this old one and would like to migrate the data, I already have the backup of the mysql but again I don't know if the messages are in the database or if I also need to copy some directories.
I don't know what directories is and where they are, if it's necessary.

4

Re: SMTP problem, can I direct insert the mail in database?

Emails are stored on file system (/var/vmail by default), not in SQL database. Since it's stored in Maildir format, you can copy the whole directory to new server directly.

Refer to our wiki tutorial if you're trying to migrate from an old iRedMail server to a new one:
http://www.iredmail.org/wiki/index.php? … ail.Server

5

Re: SMTP problem, can I direct insert the mail in database?

Really thanks Zhang!
I will read the wiki tutorial, sounds easy!

Cheers!