1

Topic: incomplete images

==== Required information ====
- iRedMail version:
- Store mail accounts in which backend (LDAP/MySQL/PGSQL):
- Linux/BSD distribution name and version:
- Related log if you're reporting an issue:
======== Required information ====
- iRedMail version: 0.8.6
- Store mail accounts in which backend (MySQL):
- Linux/BSD distribution name and version: Ubuntu Server 12.04.3 LTS precise 64bit
- Related log if you're reporting an issue:
====

Hi I'm wondering if someone can help with an e-mail issue.

There is no obvious log related to this issue.

I am running iRedMail as above as an internal e-mail server for a DVR cctv system.
The cctv sends an e-mail motion alert with an attached jpg file from one account on the server to another on the same server, say, "cameraout@mailserver.xyz" to "camerain@mailserver.xyz".
The mail appears as expected in the inbox of camerain (and therefore port 25 open etc), along with an image abc.jpg attached. However, this image is corrupted. This does not appear to be the fault of the DVR machine, as if the e-mail settings are changed to my normal ISP's e-mail account the image is emailed perfectly.

Thanking you in anticipation

2

Re: incomplete images

No idea yet.

BTW, I got the same issue years ago with a Python script (generate email with attachments), but it turned out it's caused by my Python code: forgot to close file handle. If it closed file handle before attaching file, it worked as expecte.

3

Re: incomplete images

Hi ZhangHuangbin,
I've looked at the e-mail source code for both the corrupted image and the non-corrupt image e-mails. There are significant differences between them. It appears as though those sent through iRedMail are clipped. Could I email the text files to you? I would rather not post them publicly.

Thanks.

4

Re: incomplete images

I have no idea at all.

iRedMail provides standard POP3/IMAP/SMTP protocols, if the email you submitted to Postfix (via SMTP) is corrupted, it's not a Postfix issue at all.

I have no idea which step in mail flow will cause this kind of corrupt. Sorry about this. sad
But did you try to disable "content_filter=" in Postfix for testing? Does it work for you?

5

Re: incomplete images

Hi ZhangHuangbin,

I'm very pleased to say that removing the "content_filter=" line from postfix main.cf has sorted the problem.
No more corrupt messages.

Thanks.

6

Re: incomplete images

OK, if it works without "content_filter=" in Postfix main.cf, that means it's caused by Amavisd+SpamAssassin+ClamAV.
You can try to enable "content_filter=" again, then modify Amavisd related settings in Postfix config file /etc/postfix/master.cf and test again:

smtp-amavis unix ...
  -o ...

127.0.0.1:10025 inet ...
  -o ...

Please modify just one parameter each time, so that you can know which parameter causes the issue.