Incoming mail subject with first word starting with "re" gets chopped in 3.8.8

Hi all,

We are seeing a problem where the ticket subject gets mangled when it
starts with “re”, for example “remote” gets mangled to “mote”. I know
3.8.8 is pretty old, and I’m planning to upgrade, but I can’t do it
immediately.

I assume this is happening due to some regex intended to strip off "Re:
" prefixes from the subject, but I can’t find it anywhere in the code…

So, I have a few questions:

  1. Is there a config parameter I can change to avoid this?
  2. Does the 4.x branch have this same problem?
  3. If none of the above, does anyone know what code I need to look at?
    (I’ve tried the RT::Interface::email::Gateway module, but I can’t see it
    filtering the “re” out anywhere).

Regards,

Andy D’Arcy Jewell

SysMicro Limited
Linux Support
E: andy.jewell@sysmicro.co.uk
W: www.sysmicro.co.uk

Hi all,

We are seeing a problem where the ticket subject gets mangled when it
starts with “re”, for example “remote” gets mangled to “mote”. I know
3.8.8 is pretty old, and I’m planning to upgrade, but I can’t do it
immediately.

I assume this is happening due to some regex intended to strip off
"Re: " prefixes from the subject, but I can’t find it anywhere in the
code…

So, I have a few questions:

  1. Is there a config parameter I can change to avoid this?
  2. Does the 4.x branch have this same problem?
  3. If none of the above, does anyone know what code I need to look at?
    (I’ve tried the RT::Interface::email::Gateway module, but I can’t see
    it filtering the “re” out anywhere).

Regards,

I’ve now done some more tests, and it only seems to happen when making
comments on a ticket with a subject that starts with “re”. I’m still
digging…

Andy D’Arcy Jewell

SysMicro Limited
Linux Support
T: 0844 9918804
M: 07961605631
E: andy.jewell@sysmicro.co.uk
W: www.sysmicro.co.uk

We are seeing a problem where the ticket subject gets mangled
when it starts with “re”, for example “remote” gets mangled to
"mote". I know 3.8.8 is pretty old, and I’m planning to upgrade,
but I can’t do it immediately.

I assume this is happening due to some regex intended to strip off
"Re: " prefixes from the subject, but I can’t find it anywhere in
the code…

So, I have a few questions:

  1. Is there a config parameter I can change to avoid this?
  2. Does the 4.x branch have this same problem?
  3. If none of the above, does anyone know what code I need to look
    at? (I’ve tried the RT::Interface::email::Gateway module, but I
    can’t see it filtering the “re” out anywhere).

Regards,

I’ve now done some more tests, and it only seems to happen when
making comments on a ticket with a subject that starts with “re”.
I’m still digging…

I believe you want to grab a copy of the Admin Comment template from 3.8.9 or
later and update it through the web UI.

-kevin

Hi all,

Getting annoyingly frustrated with relay access denied errors on my rt
4.0.6 instllation. Specifically:

NOQUEUE: reject: RCPT

postconf -n gives:

alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
debug_peer_level = 2
html_directory = no
inet_interfaces = all
inet_protocols = all
local_recipient_maps =
mail_owner = postfix
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
mydestination = xxx.com, localhost.xxx.com, $myhostname,
localhost.$mydomain, localhost
mydomain = yyy.yy.yy.yy
myhostname = rtsu.yyyy.yyyy.yy.yy
mynetworks = 13x.xxx.150.0/28, 127.0.0.0/8
newaliases_path = /usr/bin/newaliases.postfix
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix-2.6.6/README_FILES
relayhost = [smtp.gmail.com]:587
sample_directory = /usr/share/doc/postfix-2.6.6/samples
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options = noanonymous
smtp_sasl_tls_security_options = noanonymous
smtp_tls_CApath = /etc/ssl/certs
smtp_tls_loglevel = 1
smtp_tls_security_level = encrypt
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtp_use_tls = yes
smtpd_recipient_restrictions =
permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = $myhostname
smtpd_tls_auth_only = no
smtpd_tls_cert_file = /etc/pki/tls/certs/rtsu.yyyy.yyyy.yy.yy.crt
smtpd_tls_key_file = /etc/pki/tls/private/rtsu.yyyy.yyyy.yy.yy.key
smtpd_tls_loglevel = 1
smtpd_tls_security_level = may
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtpd_use_tls = yes
unknown_local_recipient_reject_code = 450

It seems to occur only on incoming emails, not outgoing. I am relaying
email on all outbound emails, but not when they come into the rt server.

Any help would be greatly appreciated.

Regards,
Hesan

I believe you want to grab a copy of the Admin Comment template from
3.8.9 or later and update it through the web UI. -kevin

Thanks, Kevin.

I’ve had a look at that and it is the culprit! I’ve modified the scrip
to use “s/^Re[:]*\s//” instead, and it now works. Now I’ll have a look
at the 3.8.9 version and see what that does…

Andy D’Arcy Jewell

SysMicro Limited
Linux Support
E: andy.jewell@sysmicro.co.uk
W: www.sysmicro.co.uk

Getting annoyingly frustrated with relay access denied errors on my
rt 4.0.6 instllation. Specifically:

NOQUEUE: reject: RCPT

It seems to occur only on incoming emails, not outgoing. I am
relaying email on all outbound emails, but not when they come into
the rt server.

This usually points to misconfigured aliases or not listing the
hostname that mail is being delivered to in the list of hostnames
postfix knows about. However, you’ve cut all the useful pieces out of
your error message so we’re just guessing.

-kevin

Hi Kevin,

Apologies, its:

alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
debug_peer_level = 2
html_directory = no
inet_interfaces = all
inet_protocols = all
local_recipient_maps =
mail_owner = postfix
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
mydestination = sussexstudent.com, localhost.sussexstudent.com,
$myhostname, localhost.$mydomain, localhost
mydomain = ussu.susx.ac.uk
myhostname = mail.ussusupport.co.uk
mynetworks = 139.184.150.0/28, 127.0.0.0/8
newaliases_path = /usr/bin/newaliases.postfix
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix-2.6.6/README_FILES
relayhost = [smtp.gmail.com]:587
sample_directory = /usr/share/doc/postfix-2.6.6/samples
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options = noanonymous
smtp_sasl_tls_security_options = noanonymous
smtp_tls_CApath = /etc/ssl/certs
smtp_tls_loglevel = 1
smtp_tls_security_level = encrypt
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtp_use_tls = yes
smtpd_recipient_restrictions =
permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = $myhostname
smtpd_tls_auth_only = no
smtpd_tls_cert_file = /etc/pki/tls/certs/rtsu.ussu.susx.ac.uk.crt
smtpd_tls_key_file = /etc/pki/tls/private/rtsu.ussu.susx.ac.uk.key
smtpd_tls_loglevel = 1
smtpd_tls_security_level = may
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtpd_use_tls = yes
unknown_local_recipient_reject_code = 450

I have tried a variety of hostname combinations -but I’ve been getting
nowhere for a while now.

HesanOn 13/08/2012 15:44, Kevin Falcone wrote:

o This usually points to misconfigured aliases or not listing the
hostname that mail is being delivered to in the list of hostnames
postfix knows about. However, you’ve cut all the useful pieces out of
your error message so we’re just guessing.

-kevin

I believe you want to grab a copy of the Admin Comment template from 3.8.9 or
later and update it through the web UI.

-kevin

I’m not yet that familiar with git or github… could you give me a hint
of where to find it please? I’m assuming that scrips are stored in the
database (perhaps I’m wrong!) so I thought it would be part of the
installer/db init code bundle…

-Andy

Andy D’Arcy Jewell

SysMicro Limited
Linux Support
T: 0844 9918804
M: 07961605631
E: andy.jewell@sysmicro.co.uk
W: www.sysmicro.co.uk

BTW, the hostname its currently configured to should actually be:
rtsu.ussu.susx.ac.uk and not mail.ussusupport.co.uk, (that was for a test).
HesanOn 13/08/2012 15:44, Kevin Falcone wrote:

On Mon, Aug 13, 2012 at 03:35:27PM +0100, Hesan D Yousif wrote:

Getting annoyingly frustrated with relay access denied errors on my
rt 4.0.6 instllation. Specifically:

NOQUEUE: reject: RCPT

It seems to occur only on incoming emails, not outgoing. I am
relaying email on all outbound emails, but not when they come into
the rt server.
This usually points to misconfigured aliases or not listing the
hostname that mail is being delivered to in the list of hostnames
postfix knows about. However, you’ve cut all the useful pieces out of
your error message so we’re just guessing.

-kevin

I believe you want to grab a copy of the Admin Comment template from 3.8.9 or
later and update it through the web UI.

I’m not yet that familiar with git or github… could you give me a
hint of where to find it please? I’m assuming that scrips are stored
in the database (perhaps I’m wrong!) so I thought it would be part
of the installer/db init code bundle…

You can always just download the tarball, we host all the historical
releases. The data is stored in the etc/initialdata file. The
version in 4.0 on github will also work just fine, that template
hasn’t changed materially for 4.0.

-kevin

BTW, the hostname its currently configured to should actually be:
rtsu.ussu.susx.ac.uk and not mail.ussusupport.co.uk, (that was for a
test).

Unfortunately, you still haven’t produced a full error message, which
means even with a full config we’re guessing. Also, check your
aliases file.> On 13/08/2012 15:44, Kevin Falcone wrote:

On Mon, Aug 13, 2012 at 03:35:27PM +0100, Hesan D Yousif wrote:

Getting annoyingly frustrated with relay access denied errors on my
rt 4.0.6 instllation. Specifically:

NOQUEUE: reject: RCPT

It seems to occur only on incoming emails, not outgoing. I am
relaying email on all outbound emails, but not when they come into
the rt server.
This usually points to misconfigured aliases or not listing the
hostname that mail is being delivered to in the list of hostnames
postfix knows about. However, you’ve cut all the useful pieces out of
your error message so we’re just guessing.

You can always just download the tarball, we host all the historical
releases. The data is stored in the etc/initialdata file. The
version in 4.0 on github will also work just fine, that template
hasn’t changed materially for 4.0.

-kevin
Thanks! Got it now.

Andy D’Arcy Jewell

SysMicro Limited
Linux Support
E: andy.jewell@sysmicro.co.uk
W: www.sysmicro.co.uk

/var/log/maillog gives the following response:

Aug 13 15:36:00 rtsu postfix/smtpd[2985]: NOQUEUE: reject: RCPT from
sivits.uscs.susx.ac.uk[139.184.14.88]: 554 5.7.1
rt-su-activities@ussusupport.co.uk: Relay access denied;
from=H.D.Yousif@sussex.ac.uk to=rt-su-activities@ussusupport.co.uk
proto=ESMTP helo=<sivits.uscs.susx.ac.uk>
Aug 13 15:36:00 rtsu postfix/smtpd[2985]: disconnect from
sivits.uscs.susx.ac.uk[139.184.14.88]
Aug 13 15:39:20 rtsu postfix/anvil[2987]: statistics: max connection
rate 1/60s for (smtp:139.184.14.85) at Aug 13 15:34:36
Aug 13 15:39:20 rtsu postfix/anvil[2987]: statistics: max connection
count 1 for (smtp:139.184.14.85) at Aug 13 15:34:36
Aug 13 15:39:20 rtsu postfix/anvil[2987]: statistics: max cache size 1
at Aug 13 15:34:36

output of aliases file is:

Aliases in this file will NOT be expanded in the header from

Mail, but WILL be visible over networks or from /bin/mail.

>>>>>>>>>> The program “newaliases” must be run after

>> NOTE >> this file is updated for any changes to

>>>>>>>>>> show through to sendmail.

Basic system aliases – these MUST be present.

mailer-daemon: postmaster
postmaster: root

rt-su-activities: “|/usr/local/rt/bin/rt-mailgate – queue
rt-su-activities --action correspond --url https://rtsu.ussu.susx.ac.uk/rt
rt-su-activities-comment: “|/usr/local/rt/bin/rt-mailgate --queue
rt-su-activities --action comment --url https://rtsu.ussu.susx.ac.uk/rt

General redirections for pseudo accounts.

bin: root
daemon: root
adm: root
lp: root
sync: root
shutdown: root
halt: root
mail: root
news: root
uucp: root
operator: root
games: root
gopher: root
ftp: root
nobody: root
radiusd: root
nut: root
dbus: root
vcsa: root
canna: root
wnn: root
rpm: root
nscd: root
pcap: root
apache: root
webalizer: root
dovecot: root
fax: root
quagga: root
radvd: root
pvm: root
amanda: root
privoxy: root
ident: root
named: root
xfs: root
gdm: root
mailnull: root
postgres: root
sshd: root
smmsp: root
postfix: root
netdump: root
ldap: root
squid: root
ntp: root
mysql: root
desktop: root
rpcuser: root
rpc: root
nfsnobody: root
ingres: root
system: root
toor: root
manager: root
dumper: root
abuse: root
newsadm: news
newsadmin: news
usenet: news
ftpadm: ftp
ftpadmin: ftp
ftp-adm: ftp
ftp-admin: ftp
www: webmaster
webmaster: root
noc: root
security: root
hostmaster: root
info: postmaster
marketing: postmaster
sales: postmaster
support: postmaster

trap decode to catch security attacks

decode: root

Person who should get root’s mail

root: myemail@email.com

HesanOn 13/08/2012 16:04, Kevin Falcone wrote:

On Mon, Aug 13, 2012 at 03:51:39PM +0100, Hesan D Yousif wrote:

BTW, the hostname its currently configured to should actually be:
rtsu.ussu.susx.ac.uk and not mail.ussusupport.co.uk, (that was for a
test).
Unfortunately, you still haven’t produced a full error message, which
means even with a full config we’re guessing. Also, check your
aliases file.

On 13/08/2012 15:44, Kevin Falcone wrote:

On Mon, Aug 13, 2012 at 03:35:27PM +0100, Hesan D Yousif wrote:

Getting annoyingly frustrated with relay access denied errors on my
rt 4.0.6 instllation. Specifically:

NOQUEUE: reject: RCPT

It seems to occur only on incoming emails, not outgoing. I am
relaying email on all outbound emails, but not when they come into
the rt server.
This usually points to misconfigured aliases or not listing the
hostname that mail is being delivered to in the list of hostnames
postfix knows about. However, you’ve cut all the useful pieces out of
your error message so we’re just guessing.

/var/log/maillog gives the following response:

Aug 13 15:36:00 rtsu postfix/smtpd[2985]: NOQUEUE: reject: RCPT from
sivits.uscs.susx.ac.uk[139.184.14.88]: 554 5.7.1
rt-su-activities@ussusupport.co.uk: Relay access denied;
from=H.D.Yousif@sussex.ac.uk
to=rt-su-activities@ussusupport.co.uk proto=ESMTP
helo=<sivits.uscs.susx.ac.uk>

You don’t appear to have told postfix that it accepts mail for
ussupport.co.uk.

This makes postfix think that you’re asking it to relay, and it’s set
up to deny relaying, hence the bounce.

There are a half dozen ways to configure postfix to accept mail for
ussupport.co.uk depending on what you’re doing. The simplest may be
setting mydestination, but review the postfix docs so you know if you
want that vs a virtual host.

-kevin