Quantcast
Channel: iRedMail — iRedMail Support
Viewing all 43483 articles
Browse latest View live

Piping email to PHP Script

$
0
0

================ Required information ====
- iRedMail version (check /etc/iredmail-release): iRedMail-0.9.2
- Linux/BSD distribution name and version: Ubuntu 14.04
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Web server (Apache or Nginx): Apache
- Manage mail accounts with iRedAdmin-Pro? No
- Related log if you're reporting an issue: -
====

I followed the tutorial here: http://www.iredmail.org/docs/pipe.incom … cript.html but it is not executing the php script.

I added this to /etc/postfix/master.cf and then restarted postfix

external-pipe   unix    -   n   n   -   -   pipe
    flags= user=vmail:vmail argv=/var/www/html/script.php

Then I added this to mysql

sql> USE vmail;
sql> UPDATE mailbox SET transport='external-pipe' WHERE username='thisuser@domain.com';

And this is the script.php

#!/usr/bin/php -q
<?php
mail("myemail@email.com", "Test Success", "Test is successful.", "From: Someone email@email2.com");
?>

With full execute settings

script.php File Permissions: 775

And my php location is

#>which php
#>/usr/bin/php

Changing the transport in mysql to external-pipe is sending the email somewhere because it is making it so the emails do not reach the iRedMail inbox. But the php script is not executing to email me the success mail.

What am I doing wrong?


[Solved] DKIM questions

$
0
0

==== Required information ====
- iRedMail version (check /etc/iredmail-release): 0.9.2
- Linux/BSD distribution name and version: Debian 8
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): Mysql
- Web server (Apache or Nginx): Nginx
- Related log if you're reporting an issue:
====
Hi,

I start to be a bit confused with DKIM.

amavisd-new showkeys:

; key#1 2048 bits, i=zobe, d=domain.ltd, /var/lib/dkim/domain.ltd.pem
zobe._domainkey.domain.ltd.    3600 TXT (
  "v=DKIM1; p="
  "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA8Eu79PPDQN9xBg0kFViM"
  "Ezg5BEyLUsr1EEoqz2SqOCxTBadHZgMdNuUz4htkx8pT+LECJSnUObSvAMYPfv4u"
  "IjtLMKPcAt3F9E9uobu7JF8wR5M+795FJ2k1xcioREPF3mOXggY+Mm8MF/UGlRNr"
  "ej1TFze3BiTjBTZbYdVD4on7Brl8oo5st2B1c6Hj3Hl69GDx11ctXy0bdIExRGYX"
  "1u3KueY3TbOcFpWEQUYYAXmHNAdopUdkTqzZgwniri9S/TQWEOHkgwp0NcJqkV3C"
  "A1lWaly80ixzyrRk2lHypn95Ao5lmA2uAJSaMiTj9B5CL7+N8iQ/XJXmEpi0dXnm"
  "QQIDAQAB")

; key#2 2048 bits, i=dkim, d=domain.ltd, /var/lib/dkim/domain.ltd.pem
dkim._domainkey.domain.ltd.    3600 TXT (
  "v=DKIM1; p="
  "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA8Eu79PPDQN9xBg0kFViM"
  "Ezg5BEyLUsr1EEoqz2SqOCxTBadHZgMdNuUz4htkx8pT+LECJSnUObSvAMYPfv4u"
  "IjtLMKPcAt3F9E9uobu7JF8wR5M+795FJ2k1xcioREPF3mOXggY+Mm8MF/UGlRNr"
  "ej1TFze3BiTjBTZbYdVD4on7Brl8oo5st2B1c6Hj3Hl69GDx11ctXy0bdIExRGYX"
  "1u3KueY3TbOcFpWEQUYYAXmHNAdopUdkTqzZgwniri9S/TQWEOHkgwp0NcJqkV3C"
  "A1lWaly80ixzyrRk2lHypn95Ao5lmA2uAJSaMiTj9B5CL7+N8iQ/XJXmEpi0dXnm"
  "QQIDAQAB")

amavisd-new testkeys:

TESTING#1 maelenn.org: zobe._domainkey.maelenn.org => invalid (public key: not available)
TESTING#2 maelenn.org: dkim._domainkey.maelenn.org => pass

I have now 2 dkim keys .... one is valid (dkim._domainkey), not the second one (zobe._domainkey).
How to remove the wrong key ?

Thx

Re: Whitelist recipients

$
0
0

Currently, you have to enable iRedAPD plugin 'ldap_recipient_restrictions', but it's removed in upcoming iRedAPD release. So you need to remove this plugin in /opt/iredapd/settings.py when upgrading to new iRedAPD release, and re-configure this white/blacklist stuff (with new iRedAdmin-Pro).

Here's the summary:

*) Enable plugins 'ldap_recipient_restrictions' in /opt/iredapd/settings.py.
*) Manage user's LDIF data with phpLDAPadmin or `ldapvi`, or other LDAP management tools.

Let's take your user 'user@domain.com' for example, this user is allowed to send email to 'gmail.com' and 'hotmail.com', but not other domains.

*) Add ldap attribute/value `mailWhitelistRecipient=@gmail.com` (without quotes) for your user 'user@domain.com'.
*) Add ldap attribute/value `mailWhitelistRecipient=@hotmail.com` for your user 'user@domain.com'.
*) Add ldap attribute/value `mailBlacklistRecipient=@.` for your user 'user@domain.com'.

That's it. Please test it and check iRedAPD log file /var/log/iredapd.log.

Re: Alias domains with different alias addresses

$
0
0

With upcoming iRedAdmin-Pro, you're able to manage per-user alias address, and it's allowed to add 'user@[alias_domain.com]' as a per-user alias address. i hope it solves your issue.

BTW, it requires some SQL structure change in iRedMail stable table `vmail.alias`, and this change will be mentioned in iRedMail upgrade tutorial. If you're interested in this change, here's the document:
http://www.iredmail.org/docs/upgrade.ir … asalias_to

WARNING: above upgrade tutorial is still a DRAFT, please do not apply these changes now, they may be changed until final release.

Re: [Solved] DKIM questions

$
0
0

I think the amavisd-new testkeys utility contains a bug. It seems the tool is only able to get the public key if the key is listed as the last txt record by your dns provider. Try to verify using this online tool: http://mxtoolbox.com/dkim.aspx

Re: how to : ldap as address book on microsoft outlook

$
0
0

It depends on how Outlook uses GAB. If it downloaded all contacts as a local copy, it should be fine.

BTW, you're digging a 4-year old topic, i will close this thread, please create a new topic with your own question.

Re: [Solved] DKIM questions

$
0
0

Do you enabled multiple DKIM key in Amavisd config file?

Re: [Solved] DKIM questions

$
0
0

As you can see (attachement file), this seems to work ....
But I have two keys, strictly identical (except for value = i), and I would like to remove the wrong one smile
Thx


Re: StartSSL Help

Re: [Solved] DKIM questions

$
0
0
ZhangHuangbin wrote:

Do you enabled multiple DKIM key in Amavisd config file?

I don't want Amavis using multiple dkim keys .... I would like to remove the one with the wrong "i" value (zobe) ...
Is it possible ?

Second question:

How DKIM is working in iRedmail server ? It seems that opendkim is not installed (??) ... Is it Amavis who fully manage DKIM ?

Thx

Re: [Solved] DKIM questions

$
0
0

my dkim config:

## DKIM
$interface_policy{'10024'} = 'DKIM_ALWAYS';
$policy_bank{'DKIM_ALWAYS'} = {
originating => 1,
};

$enable_dkim_verification = 1;
$enable_dkim_signing = 1;
 dkim_key('domain.ltd', 'zobe', '/var/lib/dkim/domain.ltd.pem');
 @dkim_signature_options_bysender_maps = (
  { '.' => { ttl => 21*24*3600, c => 'relaxed/simple' } } );
  @mynetworks = qw(192.168.0.0/24 192.168.1.0/24 192.168.2.0/24 192.168.3.0/24 192.168.4.0/24 127.0.0.1);  # list your internal networks

Re: Wrong X-Original-To if email alias

$
0
0

Oh, I've missing some configurations updates in master.cf !

Now, it's works, thanks Zhnag smile

Re: [Solved] DKIM questions

$
0
0
Thierry wrote:

$interface_policy{'10024'} = 'DKIM_ALWAYS';
$policy_bank{'DKIM_ALWAYS'} = {
originating => 1,
};

Why do you add these lines?

Thierry wrote:

dkim_key('domain.ltd', 'zobe', '/var/lib/dkim/domain.ltd.pem');

You defines dkim DNS record 'zobe._domainkey.domain.ltd' here. Does it shows correct output if you change 'zobe' to 'dkim'?

Did you check our tutorial here?
http://www.iredmail.org/docs/sign.dkim. … omain.html

Also, looks like you changed some other iRedMail default settings.

[SOLVED] warning: connect to 127.0.0.1:7777: Connection refused

$
0
0

==== Required information ====
- iRedMail version (check /etc/iredmail-release): 0.9.2
- Linux/BSD distribution name and version: Debian 8
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): Mysql
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro? No
- Related log if you're reporting an issue:
====

Hi,

Sometimes I have these erros:

 postfix/smtpd[19884]: warning: connect to 127.0.0.1:7777: Connection refused
Sep 20 09:13:28 zobe postfix/smtpd[19884]: warning: problem talking to server 127.0.0.1:7777: Connection refused
Sep 20 09:13:29 zobe postfix/smtpd[19884]: warning: connect to 127.0.0.1:7777: Connection refused
Sep 20 09:13:29 zobe postfix/smtpd[19884]: warning: problem talking to server 127.0.0.1:7777: Connection refused
Sep 20 09:13:29 zobe postfix/smtpd[19884]: NOQUEUE: reject: RCPT from unknown[192.168.0.112]: 451 4.3.5 Server configuration problem; from=<user@domain.tld> to=<user@gmail.com> proto=ESMTP helo=<hostname.domain.tld>

The solution:

apt-get install python-setuptool
easy_install DBUtils

~# python -c "import DBUtils; print DBUtils.__version__"
1.1

restart iredapd.service

Is there any other solution than using setuptools ? I don't like to install packages from an unknown source ....

Thx

Re: [Solved] DKIM questions

$
0
0

My mistakes was that I had two times the definition:

dkim_key('domain.ltd', 'zobe', '/var/lib/dkim/domain.ltd.pem');
and
dkim_key('domain.ltd', 'dkim', '/var/lib/dkim/domain.ltd.pem');

Everytime I was triing to run Amavis, it was saying that dkim was already in use ....

You didn't answer to my question concerning opendkim ?? Is it Amavis who is managing fully DKIM ?

Thx


Dmarc on iRedMail

$
0
0

==== Required information ====
- iRedMail version (check /etc/iredmail-release):
- Linux/BSD distribution name and version:
- Store mail accounts in which backend (LDAP/MySQL/PGSQL):
- Web server (Apache or Nginx):
- Manage mail accounts with iRedAdmin-Pro?
- Related log if you're reporting an issue:
====
Hi,
Any plan to implement this milter ? Or do I need to use "opendmarc" ?
Thx

Re: [SOLVED] warning: connect to 127.0.0.1:7777: Connection refused

$
0
0

The error means iRedAPD is not running. What's the message in /var/log/iredapd.log right after you restart iredapd service?

Re: [Solved] DKIM questions

$
0
0
Thierry wrote:

You didn't answer to my question concerning opendkim ?? Is it Amavis who is managing fully DKIM ?

amavisd fully manages dkim.

Re: Dmarc on iRedMail

$
0
0

Still no plan yet, you are free to use proper software to implement dmarc on your own.

Re: [SOLVED] warning: connect to 127.0.0.1:7777: Connection refused

$
0
0

Sorry I didn't check the logs just after I restart this service ....
I will do it next time (if there is a next time) ...
Thx

Viewing all 43483 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>