Capture the mailbox name first, then build the sender address.
;; Mail sent to `mdw-nospam-THING' should appear to come from this address.
(setq gnus-posting-styles
'(("^nnimap\\+distorted:crap\\."
- (address (concat "mdw-nospam-"
- (substring gnus-newsgroup-name (match-end 0))
- "@distorted.org.uk")))
+ (address (let* ((mailbox (substring gnus-newsgroup-name
+ (match-end 0)))
+ (entry (assoc mailbox mdw-odin-sender-alist)))
+ (concat "mdw-nospam-" mailbox "@distorted.org.uk"))))
("^nnimap\\+[^:]+-chiark:"
("X-mdw-Send-Mail" "chiark-smtp"))
("^nnimap\\+google:"